From 24f7681a87b1cbf078e738c7a0f5d85d0c91279f Mon Sep 17 00:00:00 2001 From: trenc Date: Tue, 12 Mar 2024 15:06:21 +0100 Subject: [PATCH 1/4] build: add test CI --- .github/workflows/run-tests.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..aed90b0 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,27 @@ +name: Run tests + +on: [push, pull_request] + +jobs: + tests: + name: Run tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv + coverage: none + + - name: Run composer install + run: composer install -n --prefer-dist + + - name: Prepare Laravel Application + run: | + php artisan key:generate + + - name: Run tests + run: php artisan test --without-tty From af50b331dbee1d337c844dcedca63aa1b7c073af Mon Sep 17 00:00:00 2001 From: trenc Date: Tue, 12 Mar 2024 15:11:04 +0100 Subject: [PATCH 2/4] build: change dir --- .github/workflows/run-tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index aed90b0..2c9dbd1 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,11 +17,10 @@ jobs: coverage: none - name: Run composer install - run: composer install -n --prefer-dist + run: cd src && composer install -n --prefer-dist - name: Prepare Laravel Application - run: | - php artisan key:generate + run: cd src && php artisan key:generate - name: Run tests - run: php artisan test --without-tty + run: cd src php artisan test --without-tty From 8ac30ed972b4b6d703f2ec9e9f4f2099d6cfa9a6 Mon Sep 17 00:00:00 2001 From: trenc Date: Tue, 12 Mar 2024 15:15:27 +0100 Subject: [PATCH 3/4] build: use exmple .env for CI --- .github/workflows/run-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2c9dbd1..00cd1dd 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,7 +17,10 @@ jobs: coverage: none - name: Run composer install - run: cd src && composer install -n --prefer-dist + run: | + cd src + cp .env.example .env + composer install -n --prefer-dist - name: Prepare Laravel Application run: cd src && php artisan key:generate From 73fdb86e041353662cdd963f682b9f8c6ecd1eae Mon Sep 17 00:00:00 2001 From: trenc Date: Tue, 12 Mar 2024 15:16:57 +0100 Subject: [PATCH 4/4] build: fiy typo in CI --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 00cd1dd..d0138e0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -26,4 +26,4 @@ jobs: run: cd src && php artisan key:generate - name: Run tests - run: cd src php artisan test --without-tty + run: cd src && php artisan test --without-tty