From aae322d9c65e527e56eebbf43d85fae20258a5ad Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Thu, 4 Apr 2024 21:42:25 +0100 Subject: [PATCH 1/4] Add testing workflow for GitHub Actions --- .github/workflows/tests.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..642e38c --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,36 @@ +name: Test Suite + +on: + push: + pull_request: + +jobs: + php_tests: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + php: [8.2, 8.3] + framework: [10.*, 11.*] + testbench: [8.*, 9.*] + os: [ubuntu-latest] + + name: ${{ matrix.php }} - ${{ matrix.laravel }} + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.framework }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer install --no-interaction + + - name: Run PHPUnit + run: vendor/bin/phpunit From c77c6940d9e927d8d0dec69715f4259c358af478 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Thu, 4 Apr 2024 21:51:34 +0100 Subject: [PATCH 2/4] wip --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 642e38c..94d347e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -11,7 +11,7 @@ jobs: strategy: matrix: php: [8.2, 8.3] - framework: [10.*, 11.*] + laravel: [10.*, 11.*] testbench: [8.*, 9.*] os: [ubuntu-latest] @@ -29,7 +29,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.framework }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer install --no-interaction - name: Run PHPUnit From dc14adcac7990c5c43ef4820d5e88777db9fc827 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Thu, 4 Apr 2024 21:55:23 +0100 Subject: [PATCH 3/4] wip --- .github/workflows/tests.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 94d347e..4bddc42 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -15,7 +15,8 @@ jobs: testbench: [8.*, 9.*] os: [ubuntu-latest] - name: ${{ matrix.php }} - ${{ matrix.laravel }} + + name: ${{ matrix.php }} - ${{ matrix.laravel }} - ${{ matrix.testbench }} steps: - name: Checkout code From fe02e7057ba67c71c9e38a1c1a2bf482172a17a2 Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Thu, 4 Apr 2024 21:56:06 +0100 Subject: [PATCH 4/4] wip --- .github/workflows/tests.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 4bddc42..4bc08f6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -12,11 +12,9 @@ jobs: matrix: php: [8.2, 8.3] laravel: [10.*, 11.*] - testbench: [8.*, 9.*] os: [ubuntu-latest] - - name: ${{ matrix.php }} - ${{ matrix.laravel }} - ${{ matrix.testbench }} + name: ${{ matrix.php }} - ${{ matrix.laravel }} steps: - name: Checkout code @@ -30,7 +28,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update composer install --no-interaction - name: Run PHPUnit