From b186b5bdebf87318fb13426fe3391742613d16b1 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:01:03 -0500 Subject: [PATCH 01/14] use pint --- .github/workflows/pint.yml | 23 +++++++++++++++++++++++ .github/{ => workflows}/run-tests-L7.yml | 0 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/pint.yml rename .github/{ => workflows}/run-tests-L7.yml (100%) diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml new file mode 100644 index 0000000..826a2a7 --- /dev/null +++ b/.github/workflows/pint.yml @@ -0,0 +1,23 @@ +name: PHP Linting (Pint) +on: + workflow_dispatch: + push: + branches-ignore: + - "dependabot/npm_and_yarn/*" +jobs: + phplint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - name: "laravel-pint" + uses: aglipanci/laravel-pint-action@0.1.0 + with: + preset: laravel + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: PHP Linting (Pint) + skip_fetch: true diff --git a/.github/run-tests-L7.yml b/.github/workflows/run-tests-L7.yml similarity index 100% rename from .github/run-tests-L7.yml rename to .github/workflows/run-tests-L7.yml From 1965a324f43159e4f1ff188b3681bd8a6a1596c7 Mon Sep 17 00:00:00 2001 From: swilla Date: Fri, 8 Dec 2023 17:04:06 +0000 Subject: [PATCH 02/14] PHP Linting (Pint) --- src/AirtableManager.php | 2 -- src/Api/AirtableApiClient.php | 8 +++++++- src/Api/ApiClient.php | 2 +- tests/Feature/ClientTest.php | 20 ++++++++++---------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/AirtableManager.php b/src/AirtableManager.php index 0857c6d..7ef5e63 100755 --- a/src/AirtableManager.php +++ b/src/AirtableManager.php @@ -35,8 +35,6 @@ public function __construct($app) /** * Get a airtable table instance. - * - * @param string $table */ public function table(string $table) { diff --git a/src/Api/AirtableApiClient.php b/src/Api/AirtableApiClient.php index 250bece..81fc93d 100644 --- a/src/Api/AirtableApiClient.php +++ b/src/Api/AirtableApiClient.php @@ -11,16 +11,22 @@ class AirtableApiClient implements ApiClient private $client; private $typecast; + private $base; + private $table; + private $delay; private $filters = []; + private $fields = []; + private $sorts = []; + private $offset = false; - public function __construct($base, $table, $access_token, Http $client = null, $typecast = false, $delayBetweenRequests = 200000) + public function __construct($base, $table, $access_token, ?Http $client = null, $typecast = false, $delayBetweenRequests = 200000) { $this->base = $base; $this->table = $table; diff --git a/src/Api/ApiClient.php b/src/Api/ApiClient.php index ec27e1a..57cb0a8 100644 --- a/src/Api/ApiClient.php +++ b/src/Api/ApiClient.php @@ -4,7 +4,7 @@ interface ApiClient { - public function get(string $id = null); + public function get(?string $id = null); public function post($contents = null); diff --git a/tests/Feature/ClientTest.php b/tests/Feature/ClientTest.php index a047179..7fad28c 100644 --- a/tests/Feature/ClientTest.php +++ b/tests/Feature/ClientTest.php @@ -20,8 +20,8 @@ public function it_can_be_instantiated() public function it_can_post() { $expectedResponse = [ - 'id' => 'randomlygenerated', - 'fields' => ['Company Name' => 'Tapp Network'], + 'id' => 'randomlygenerated', + 'fields' => ['Company Name' => 'Tapp Network'], 'createdTime' => 'timestamp', ]; @@ -63,13 +63,13 @@ public function it_can_sort_asc() //Ascending sort $expectedResponseAsc = [ [ - 'id' => 0, - 'fields' => ['Company Name' => 'A Network'], + 'id' => 0, + 'fields' => ['Company Name' => 'A Network'], 'createdTime' => 'timestamp', ], [ - 'id' => 1, - 'fields' => ['Company Name' => 'B Network'], + 'id' => 1, + 'fields' => ['Company Name' => 'B Network'], 'createdTime' => 'timestamp', ], ]; @@ -93,13 +93,13 @@ public function it_can_sort_desc() //Descending sort $expectedResponseDesc = [ [ - 'id' => 1, - 'fields' => ['Company Name' => 'B Network'], + 'id' => 1, + 'fields' => ['Company Name' => 'B Network'], 'createdTime' => 'timestamp', ], [ - 'id' => 0, - 'fields' => ['Company Name' => 'A Network'], + 'id' => 0, + 'fields' => ['Company Name' => 'A Network'], 'createdTime' => 'timestamp', ], ]; From 6b815e2ea90cb473ecd1c9c32cb144131fc67824 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:07:49 -0500 Subject: [PATCH 03/14] update versions --- .github/workflows/run-tests-L7.yml | 81 +++++++++++----------- .github/workflows/run-tests-l8.yml | 107 ++++++++++++++--------------- 2 files changed, 91 insertions(+), 97 deletions(-) diff --git a/.github/workflows/run-tests-L7.yml b/.github/workflows/run-tests-L7.yml index 93432a7..1a3d96f 100644 --- a/.github/workflows/run-tests-L7.yml +++ b/.github/workflows/run-tests-L7.yml @@ -3,44 +3,43 @@ name: "Run Tests - Older" on: [push, pull_request] jobs: - test: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [8.0, 7.4, 7.3, 7.2] - laravel: [7.*, 6.*] - dependency-version: [prefer-lowest, prefer-stable] - include: - - laravel: 7.* - testbench: 5.* - - laravel: 6.* - testbench: 4.* - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - cp .env.example .env - - name: Execute tests - run: vendor/bin/phpunit + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [8.3, 8.2, 8.1, 8.0] + laravel: [7.*, 6.*] + dependency-version: [prefer-lowest, prefer-stable] + include: + - laravel: 7.* + testbench: 5.* + - laravel: 6.* + testbench: 4.* + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + cp .env.example .env + - name: Execute tests + run: vendor/bin/phpunit diff --git a/.github/workflows/run-tests-l8.yml b/.github/workflows/run-tests-l8.yml index 211a50f..3375a1d 100644 --- a/.github/workflows/run-tests-l8.yml +++ b/.github/workflows/run-tests-l8.yml @@ -3,59 +3,54 @@ name: "Run Tests - Current" on: [push, pull_request] jobs: - test: - - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [8.1, 8.0, 7.4, 7.3] - laravel: [9.*, 8.*, 10.*] - dependency-version: [prefer-lowest, prefer-stable] - exclude: - - laravel: 10.* - php: 8.0 - - laravel: 10.* - php: 7.4 - - laravel: 10.* - php: 7.3 - - laravel: 9.* - php: 7.4 - - laravel: 9.* - php: 7.3 - - laravel: 8.* - php: 8.1 - include: - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: 6.* - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: none - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - cp .env.example .env - - name: Execute tests - run: vendor/bin/phpunit + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [8.3, 8.2, 8.1, 8.0, 7.4] + laravel: [9.*, 8.*, 10.*] + dependency-version: [prefer-lowest, prefer-stable] + exclude: + - laravel: 10.* + php: 8.0 + - laravel: 10.* + php: 7.4 + - laravel: 9.* + php: 7.4 + - laravel: 8.* + php: 8.1 + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: 6.* + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + cp .env.example .env + - name: Execute tests + run: vendor/bin/phpunit From ca6d7a4ec5d3d3f00b14469fc30f1677cd9c80ce Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:36:05 -0500 Subject: [PATCH 04/14] exclude some things --- .github/workflows/run-tests-l8.yml | 4 ++++ composer.json | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests-l8.yml b/.github/workflows/run-tests-l8.yml index 3375a1d..a586442 100644 --- a/.github/workflows/run-tests-l8.yml +++ b/.github/workflows/run-tests-l8.yml @@ -20,6 +20,10 @@ jobs: php: 7.4 - laravel: 8.* php: 8.1 + - laravel: 8.* + php: 8.2 + - laravel: 8.* + php: 8.3 include: - laravel: 10.* testbench: 8.* diff --git a/composer.json b/composer.json index c2b617d..5197ed6 100755 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3", "guzzlehttp/guzzle": "~6.0 || ~7.0", "illuminate/support": "5.7.* || 5.8.* ||^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0", "symfony/dotenv": "^4.2 || ^5.1" @@ -27,7 +27,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.4 || ^9.3.3" + "phpunit/phpunit": "^8.4 || ^9.3.3 || ^10.0", }, "autoload": { "psr-4": { @@ -43,12 +43,12 @@ "analyse": "vendor/bin/phpstan analyse", "test": "vendor/bin/phpunit", "test-coverage": "vendor/bin/phpunit --coverage-html coverage" - }, "config": { "sort-packages": true, "allow-plugins": { - "phpstan/extension-installer": true + "phpstan/extension-installer": true, + "pestphp/pest-plugin": false } }, "extra": { From b90ddd0ae53a3a1cf409ad9be353dc2d001a3707 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:36:51 -0500 Subject: [PATCH 05/14] fix composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5197ed6..cc60e65 100755 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.4 || ^9.3.3 || ^10.0", + "phpunit/phpunit": "^8.4 || ^9.3.3 || ^10.0" }, "autoload": { "psr-4": { From 0df04a51ed16b1022daa4d9ead97914ad75bbe57 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:41:27 -0500 Subject: [PATCH 06/14] work around for supporting multiple versions of phpunit --- .github/workflows/run-tests-l8.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-tests-l8.yml b/.github/workflows/run-tests-l8.yml index a586442..65be2ad 100644 --- a/.github/workflows/run-tests-l8.yml +++ b/.github/workflows/run-tests-l8.yml @@ -56,5 +56,7 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction cp .env.example .env + - name: Migrate phpunit config + run: vendor/bin/phpunit --migrate-configuration - name: Execute tests run: vendor/bin/phpunit From deaed98a418c34852213d526f8505934afe70ed3 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:44:20 -0500 Subject: [PATCH 07/14] remove phpunit 10 support --- .github/workflows/run-tests-l8.yml | 2 -- composer.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/run-tests-l8.yml b/.github/workflows/run-tests-l8.yml index 65be2ad..a586442 100644 --- a/.github/workflows/run-tests-l8.yml +++ b/.github/workflows/run-tests-l8.yml @@ -56,7 +56,5 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction cp .env.example .env - - name: Migrate phpunit config - run: vendor/bin/phpunit --migrate-configuration - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index cc60e65..c4b3e3b 100755 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.4 || ^9.3.3 || ^10.0" + "phpunit/phpunit": "^8.4 || ^9.3.3" }, "autoload": { "psr-4": { From 76b0dbf327d006585ac56224d2fa4c8a0337288f Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:47:30 -0500 Subject: [PATCH 08/14] migrated config --- .gitignore | 1 + composer.json | 2 +- phpunit.xml.dist | 22 ++++++---------------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index b7f1799..14d9e6d 100755 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ coverage .phpunit.result.cache .DS_Store .idea +.phpunit.cache diff --git a/composer.json b/composer.json index c4b3e3b..cc60e65 100755 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.4 || ^9.3.3" + "phpunit/phpunit": "^8.4 || ^9.3.3 || ^10.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5d3b72b..ae92e16 100755 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,21 +1,6 @@ - + - - src/ - @@ -30,4 +15,9 @@ ./tests/Feature + + + src/ + + From d7bfcaefed0e30be55ef8d0994b1f27ba442ae59 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:49:52 -0500 Subject: [PATCH 09/14] coverage --- .github/workflows/run-tests-L7.yml | 2 +- .github/workflows/run-tests-l8.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests-L7.yml b/.github/workflows/run-tests-L7.yml index 1a3d96f..b0c78a9 100644 --- a/.github/workflows/run-tests-L7.yml +++ b/.github/workflows/run-tests-L7.yml @@ -34,7 +34,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: none + coverage: pcov - name: Install dependencies run: | diff --git a/.github/workflows/run-tests-l8.yml b/.github/workflows/run-tests-l8.yml index a586442..a83cbbe 100644 --- a/.github/workflows/run-tests-l8.yml +++ b/.github/workflows/run-tests-l8.yml @@ -49,7 +49,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: none + coverage: pcov - name: Install dependencies run: | From 0ff251a90e710b4e766ca7944fb19c4428c7a285 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 12:56:14 -0500 Subject: [PATCH 10/14] exclude versions --- .github/workflows/run-tests-L7.yml | 14 ++++++- .github/workflows/run-tests-l8.yml | 60 ------------------------------ 2 files changed, 13 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/run-tests-l8.yml diff --git a/.github/workflows/run-tests-L7.yml b/.github/workflows/run-tests-L7.yml index b0c78a9..6dd50a0 100644 --- a/.github/workflows/run-tests-L7.yml +++ b/.github/workflows/run-tests-L7.yml @@ -16,7 +16,19 @@ jobs: testbench: 5.* - laravel: 6.* testbench: 4.* - + exclude: + - laravel: 6.* + php: 8.1 + - laravel: 6.* + php: 8.2 + - laravel: 6.* + php: 8.3 + - laravel: 7.* + php: 8.1 + - laravel: 7.* + php: 8.2 + - laravel: 7.* + php: 8.3 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} steps: diff --git a/.github/workflows/run-tests-l8.yml b/.github/workflows/run-tests-l8.yml deleted file mode 100644 index a83cbbe..0000000 --- a/.github/workflows/run-tests-l8.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: "Run Tests - Current" - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [8.3, 8.2, 8.1, 8.0, 7.4] - laravel: [9.*, 8.*, 10.*] - dependency-version: [prefer-lowest, prefer-stable] - exclude: - - laravel: 10.* - php: 8.0 - - laravel: 10.* - php: 7.4 - - laravel: 9.* - php: 7.4 - - laravel: 8.* - php: 8.1 - - laravel: 8.* - php: 8.2 - - laravel: 8.* - php: 8.3 - include: - - laravel: 10.* - testbench: 8.* - - laravel: 9.* - testbench: 7.* - - laravel: 8.* - testbench: 6.* - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: pcov - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - cp .env.example .env - - name: Execute tests - run: vendor/bin/phpunit From f5013d28b428e41b6a1bb61be73a8a5c13ac5614 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 13:00:49 -0500 Subject: [PATCH 11/14] exclude some more --- .github/workflows/run-tests-L7.yml | 4 ++ .github/workflows/run-tests.yml | 60 ++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests-L7.yml b/.github/workflows/run-tests-L7.yml index 6dd50a0..c9eedf3 100644 --- a/.github/workflows/run-tests-L7.yml +++ b/.github/workflows/run-tests-L7.yml @@ -17,12 +17,16 @@ jobs: - laravel: 6.* testbench: 4.* exclude: + - laravel: 6.* + php: 8.0 - laravel: 6.* php: 8.1 - laravel: 6.* php: 8.2 - laravel: 6.* php: 8.3 + - laravel: 7.* + php: 8.0 - laravel: 7.* php: 8.1 - laravel: 7.* diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..a586442 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,60 @@ +name: "Run Tests - Current" + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [8.3, 8.2, 8.1, 8.0, 7.4] + laravel: [9.*, 8.*, 10.*] + dependency-version: [prefer-lowest, prefer-stable] + exclude: + - laravel: 10.* + php: 8.0 + - laravel: 10.* + php: 7.4 + - laravel: 9.* + php: 7.4 + - laravel: 8.* + php: 8.1 + - laravel: 8.* + php: 8.2 + - laravel: 8.* + php: 8.3 + include: + - laravel: 10.* + testbench: 8.* + - laravel: 9.* + testbench: 7.* + - laravel: 8.* + testbench: 6.* + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + cp .env.example .env + - name: Execute tests + run: vendor/bin/phpunit From 1ef833dd24d35a6662668e89a50e39f31dabf48c Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Fri, 8 Dec 2023 13:03:37 -0500 Subject: [PATCH 12/14] do not prefer lowest --- .github/workflows/run-tests-L7.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests-L7.yml b/.github/workflows/run-tests-L7.yml index c9eedf3..aaa2b4f 100644 --- a/.github/workflows/run-tests-L7.yml +++ b/.github/workflows/run-tests-L7.yml @@ -10,7 +10,7 @@ jobs: matrix: php: [8.3, 8.2, 8.1, 8.0] laravel: [7.*, 6.*] - dependency-version: [prefer-lowest, prefer-stable] + dependency-version: [prefer-stable] include: - laravel: 7.* testbench: 5.* From 7172c58ac46638a02dd47300dcac9caf1a092f0a Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Sat, 9 Dec 2023 10:24:47 -0500 Subject: [PATCH 13/14] remove older laravel tests --- .github/workflows/run-tests-L7.yml | 61 ------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 .github/workflows/run-tests-L7.yml diff --git a/.github/workflows/run-tests-L7.yml b/.github/workflows/run-tests-L7.yml deleted file mode 100644 index aaa2b4f..0000000 --- a/.github/workflows/run-tests-L7.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: "Run Tests - Older" - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: [8.3, 8.2, 8.1, 8.0] - laravel: [7.*, 6.*] - dependency-version: [prefer-stable] - include: - - laravel: 7.* - testbench: 5.* - - laravel: 6.* - testbench: 4.* - exclude: - - laravel: 6.* - php: 8.0 - - laravel: 6.* - php: 8.1 - - laravel: 6.* - php: 8.2 - - laravel: 6.* - php: 8.3 - - laravel: 7.* - php: 8.0 - - laravel: 7.* - php: 8.1 - - laravel: 7.* - php: 8.2 - - laravel: 7.* - php: 8.3 - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: pcov - - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - cp .env.example .env - - name: Execute tests - run: vendor/bin/phpunit From d6dd1a0695aa4325a6041f2589fed39cc4bd4bf7 Mon Sep 17 00:00:00 2001 From: Steve Williamson Date: Sat, 9 Dec 2023 10:28:13 -0500 Subject: [PATCH 14/14] coverage driver --- .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 a586442..a83cbbe 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -49,7 +49,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv - coverage: none + coverage: pcov - name: Install dependencies run: |