From cb0c8d6940f064007b2c3baa8dd12eb5e9ffad3f Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sat, 9 Dec 2023 11:53:36 +0100 Subject: [PATCH 1/3] Add Integration test --- .github/workflows/integration-tests.yml | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/integration-tests.yml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 0000000..0b711e2 --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,38 @@ +name: Integration Test +on: + push: +jobs: + integration: + services: + nginx-php-fpm: + image: jkaninda/nginx-php-fpm:latest + ports: + - "80:80" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Create Laravel project + run: | + composer create-project laravel/laravel laravel + - name: Fix Permission + run: chmod -R 777 ./laravel/storage + #- name: Run docker-compose + # run: docker-compose up -d + - name: Create script.js for K6 test + run: | + touch script.js && cat > script.js < Date: Sat, 9 Dec 2023 11:57:38 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 78cbee9..7639945 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build](https://github.com/jkaninda/nginx-php-fpm/actions/workflows/build.yml/badge.svg)](https://github.com/jkaninda/nginx-php-fpm/actions/workflows/build.yml) +[![Integration Test](https://github.com/jkaninda/nginx-php-fpm/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/jkaninda/nginx-php-fpm/actions/workflows/integration-tests.yml) ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/jkaninda/nginx-php-fpm?style=flat-square) ![Docker Pulls](https://img.shields.io/docker/pulls/jkaninda/nginx-php-fpm?style=flat-square) From 843cc4caf574fbb91dcf3817b28fae5cb9faa8d0 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sat, 9 Dec 2023 18:14:00 +0100 Subject: [PATCH 3/3] Update Integration test --- .github/workflows/integration-tests.yml | 23 +++++++++---------- tests/compose.yaml | 30 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 tests/compose.yaml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0b711e2..e1e62b8 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -3,11 +3,6 @@ on: push: jobs: integration: - services: - nginx-php-fpm: - image: jkaninda/nginx-php-fpm:latest - ports: - - "80:80" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,8 +11,10 @@ jobs: composer create-project laravel/laravel laravel - name: Fix Permission run: chmod -R 777 ./laravel/storage - #- name: Run docker-compose - # run: docker-compose up -d + - name: Run docker-compose + run: + cp ./tests/compose.yaml compose.yaml && + docker-compose -f "compose.yaml" up -d - name: Create script.js for K6 test run: | touch script.js && cat > script.js <