From accd3ed7626d94575f96cc22f4cf52aa4693f87d Mon Sep 17 00:00:00 2001 From: Roelof Roos Date: Tue, 2 Feb 2021 18:50:53 +0100 Subject: [PATCH 01/12] Added GitHub Actions config - Lowered phpunit min version to 8.0 to allow --prefer-lowest to work right. --- .github/workflows/test.yml | 95 ++++++++++++++++++++++++++++++++++++++ composer.json | 2 +- 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..da607f6 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,95 @@ +name: Run unit tests + +on: + - push + - pull_request + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + laravel: + - '7.0' + - '8.0' + + php: + - '7.4' + - '8.0' + + stability: + - lowest + - highest + + include: + - laravel: '7.0' + testbench: '5.0' + + - laravel: '8.0' + testbench: '6.0' + + # Report coverage on edge test + - laravel: '8.0' + php: '8.0' + stability: highest + coverage: true + exclude: + # Laravel 7.x doesn't work with PHP 8.0 + - laravel: '7.0' + php: '8.0' + + # Laravel 8.0 had the same problem at the start + - laravel: '8.0' + php: '8.0' + stability: lowest + + name: Test Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }} (${{ matrix.stability }}) + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: zip + coverage: pcov + + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Configure Laravel and Laravel Testbench + run: + composer require + "laravel/framework:${{ matrix.laravel }}" + "orchestra/testbench:${{ matrix.testbench }}" + --no-interaction + --no-update + + - name: Install Composer Dependencies + uses: ramsey/composer-install@v1 + with: + dependency-versions: ${{ matrix.stability }} + composer-options: "--ignore-platform-req=php" + + - name: Execute tests + id: phpunit + run: + vendor/bin/phpunit --coverage-clover=coverage.clover + + - name: Upload coverage to Ocular + continue-on-error: true + run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover + + - name: Determine coverage + uses: slavcodev/coverage-monitor-action@1.1.0 + if: github.event_name == 'pull_request' && matrix.coverage == true + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + clover_file: coverage.clover + threshold_alert: 75 + threshold_warning: 95 diff --git a/composer.json b/composer.json index 6bd153a..a5314d1 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require-dev": { "orchestra/testbench": "^4.0 || ^5.0 || ^6.0", "mockery/mockery": "^1.3", - "phpunit/phpunit": "^9.0" + "phpunit/phpunit": "8.0 || ^9.0" }, "autoload": { "psr-4": { From d18e9bf515cc4f05b26990a311f6d7e9741d3186 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:08:02 +0100 Subject: [PATCH 02/12] add github style workflow --- .github/workflows/check-style.yml | 23 +++++++++++ .github/workflows/{test.yml => run-tests.yml} | 41 ++++++++----------- .php_cs.dist | 35 ++++++++++++++++ .styleci.yml | 4 -- 4 files changed, 76 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/check-style.yml rename .github/workflows/{test.yml => run-tests.yml} (74%) create mode 100644 .php_cs.dist delete mode 100644 .styleci.yml diff --git a/.github/workflows/check-style.yml b/.github/workflows/check-style.yml new file mode 100644 index 0000000..cfeff1e --- /dev/null +++ b/.github/workflows/check-style.yml @@ -0,0 +1,23 @@ +name: Check & fix styling + +on: [ push ] + +jobs: + php-cs-fixer: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + + - name: Run PHP CS Fixer + uses: docker://oskarstark/php-cs-fixer-ga + with: + args: --config=.php_cs.dist --allow-risky=yes + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Fix styling \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/run-tests.yml similarity index 74% rename from .github/workflows/test.yml rename to .github/workflows/run-tests.yml index da607f6..160ddbb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/run-tests.yml @@ -6,45 +6,40 @@ on: jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: - laravel: - - '7.0' - - '8.0' + os: [ubuntu-latest] + php: [7.4, 8.0] + laravel: [7.*, 8.*] + dependency-version: [prefer-stable] + include: + - laravel: '7.0' + testbench: '5.0' + + - laravel: 8.* + testbench: 6.* - php: - - '7.4' - - '8.0' + # Report coverage on edge test + - laravel: '8.0' + php: '8.0' + stability: highest + coverage: true stability: - lowest - highest - include: - - laravel: '7.0' - testbench: '5.0' - - - laravel: '8.0' - testbench: '6.0' - - # Report coverage on edge test - - laravel: '8.0' - php: '8.0' - stability: highest - coverage: true exclude: - # Laravel 7.x doesn't work with PHP 8.0 - laravel: '7.0' php: '8.0' - # Laravel 8.0 had the same problem at the start - laravel: '8.0' php: '8.0' stability: lowest - name: Test Laravel ${{ matrix.laravel }} on PHP ${{ matrix.php }} (${{ matrix.stability }}) + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - (${{ matrix.stability }}) steps: - name: Checkout code diff --git a/.php_cs.dist b/.php_cs.dist new file mode 100644 index 0000000..0768361 --- /dev/null +++ b/.php_cs.dist @@ -0,0 +1,35 @@ +notPath('vendor') + ->in([ + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + ->name('*.php') + ->notName('*.blade.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true); + +return PhpCsFixer\Config::create() + ->setRules([ + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'no_unused_imports' => true, + 'not_operator_with_successor_space' => true, + 'trailing_comma_in_multiline_array' => true, + 'phpdoc_scalar' => true, + 'unary_operator_spaces' => true, + 'binary_operator_spaces' => true, + 'blank_line_before_statement' => [ + 'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'], + ], + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_var_without_name' => true, + 'method_argument_space' => [ + 'on_multiline' => 'ensure_fully_multiline', + 'keep_multiple_spaces_after_comma' => true, + ] + ]) + ->setFinder($finder); \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index cedbd2b..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,4 +0,0 @@ -preset: laravel -finder: - exclude: - - "tests/fixtures" \ No newline at end of file From 93a0dabea37e9df40254edc81ace327843c66062 Mon Sep 17 00:00:00 2001 From: Naoray Date: Tue, 2 Feb 2021 18:08:37 +0000 Subject: [PATCH 03/12] Fix styling --- .php_cs.cache | 1 + .../nova/model-configured-without-timestamps.php | 2 +- tests/fixtures/nova/model-configured.php | 4 ++-- tests/fixtures/nova/model-relationships.php | 12 ++++++------ tests/fixtures/nova/nested-components.php | 4 ++-- tests/fixtures/nova/nullable-relationships.php | 4 ++-- tests/fixtures/nova/readme-example.php | 4 ++-- tests/fixtures/nova/relationships.php | 4 ++-- tests/fixtures/nova/unconventional.php | 6 +++--- tests/fixtures/nova/with-timezones.php | 2 +- 10 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 .php_cs.cache diff --git a/.php_cs.cache b/.php_cs.cache new file mode 100644 index 0000000..55b40ac --- /dev/null +++ b/.php_cs.cache @@ -0,0 +1 @@ +{"php":"8.0.1","version":"2.18.2","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sortAlgorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline_array":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true},"hashes":{"src\/BlueprintNovaAddonServiceProvider.php":493940480,"src\/Tasks\/AddTimestampFields.php":2123702612,"src\/Tasks\/AddIdentifierField.php":2788065737,"src\/Tasks\/RemapImports.php":2036426693,"src\/Tasks\/AddRegularFields.php":400311029,"src\/Tasks\/AddRelationshipFields.php":949953355,"src\/Tasks\/InteractWithRelationships.php":1857404547,"src\/HasStubPath.php":3584619922,"src\/Translators\/Rules.php":2952814748,"src\/Contracts\/Task.php":1649511144,"src\/NovaGenerator.php":1762550728,"tests\/RulesTranslatorTest.php":4126035691,"tests\/fixtures\/nova\/with-timezones.php":1313561587,"tests\/fixtures\/nova\/unconventional.php":1463634763,"tests\/fixtures\/nova\/model-configured.php":3109372952,"tests\/fixtures\/nova\/relationships.php":1900909876,"tests\/fixtures\/nova\/nested-components.php":2138509451,"tests\/fixtures\/nova\/model-configured-without-timestamps.php":174634294,"tests\/fixtures\/nova\/model-relationships.php":751021281,"tests\/fixtures\/nova\/nullable-relationships.php":2871191248,"tests\/fixtures\/nova\/readme-example.php":3905724907,"tests\/NovaGeneratorTest.php":803538511,"tests\/TestCase.php":2014583879}} \ No newline at end of file diff --git a/tests/fixtures/nova/model-configured-without-timestamps.php b/tests/fixtures/nova/model-configured-without-timestamps.php index d9ad0a4..8b97a15 100644 --- a/tests/fixtures/nova/model-configured-without-timestamps.php +++ b/tests/fixtures/nova/model-configured-without-timestamps.php @@ -2,9 +2,9 @@ namespace App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; use Laravel\Nova\Fields\BelongsTo; +use Laravel\Nova\Fields\ID; class Comment extends Resource { diff --git a/tests/fixtures/nova/model-configured.php b/tests/fixtures/nova/model-configured.php index fa46198..9224f3e 100644 --- a/tests/fixtures/nova/model-configured.php +++ b/tests/fixtures/nova/model-configured.php @@ -2,10 +2,10 @@ namespace Some\App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\BelongsTo; +use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\ID; class Comment extends Resource { diff --git a/tests/fixtures/nova/model-relationships.php b/tests/fixtures/nova/model-relationships.php index 88c7984..a60e9d0 100644 --- a/tests/fixtures/nova/model-relationships.php +++ b/tests/fixtures/nova/model-relationships.php @@ -2,15 +2,15 @@ namespace App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\HasOne; -use Laravel\Nova\Fields\HasMany; -use Laravel\Nova\Fields\MorphTo; -use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\BelongsTo; -use Laravel\Nova\Fields\MorphMany; use Laravel\Nova\Fields\BelongsToMany; +use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\HasMany; +use Laravel\Nova\Fields\HasOne; +use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\MorphMany; +use Laravel\Nova\Fields\MorphTo; class Subscription extends Resource { diff --git a/tests/fixtures/nova/nested-components.php b/tests/fixtures/nova/nested-components.php index 256e3c4..71d74d7 100644 --- a/tests/fixtures/nova/nested-components.php +++ b/tests/fixtures/nova/nested-components.php @@ -3,10 +3,10 @@ namespace App\Nova\Admin; use App\Nova\Resource; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\Text; use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\Text; class User extends Resource { diff --git a/tests/fixtures/nova/nullable-relationships.php b/tests/fixtures/nova/nullable-relationships.php index 667c585..fd74103 100644 --- a/tests/fixtures/nova/nullable-relationships.php +++ b/tests/fixtures/nova/nullable-relationships.php @@ -2,10 +2,10 @@ namespace App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\BelongsTo; +use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\ID; class Subscription extends Resource { diff --git a/tests/fixtures/nova/readme-example.php b/tests/fixtures/nova/readme-example.php index 36f8903..7692e2b 100644 --- a/tests/fixtures/nova/readme-example.php +++ b/tests/fixtures/nova/readme-example.php @@ -2,10 +2,10 @@ namespace App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\Text; use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\Text; use Laravel\Nova\Fields\Textarea; class Post extends Resource diff --git a/tests/fixtures/nova/relationships.php b/tests/fixtures/nova/relationships.php index 3e30c3a..f080c5a 100644 --- a/tests/fixtures/nova/relationships.php +++ b/tests/fixtures/nova/relationships.php @@ -2,10 +2,10 @@ namespace App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\BelongsTo; +use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\ID; class Comment extends Resource { diff --git a/tests/fixtures/nova/unconventional.php b/tests/fixtures/nova/unconventional.php index 732c894..92528c9 100644 --- a/tests/fixtures/nova/unconventional.php +++ b/tests/fixtures/nova/unconventional.php @@ -2,12 +2,12 @@ namespace App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; +use Laravel\Nova\Fields\BelongsTo; use Laravel\Nova\Fields\Code; -use Laravel\Nova\Fields\Text; use Laravel\Nova\Fields\DateTime; -use Laravel\Nova\Fields\BelongsTo; +use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\Text; class Team extends Resource { diff --git a/tests/fixtures/nova/with-timezones.php b/tests/fixtures/nova/with-timezones.php index 84a9caf..e11a737 100644 --- a/tests/fixtures/nova/with-timezones.php +++ b/tests/fixtures/nova/with-timezones.php @@ -2,9 +2,9 @@ namespace App\Nova; -use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\ID; class Comment extends Resource { From 5b294d36721842c3998e8a471b7612a5e0a56879 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:12:44 +0100 Subject: [PATCH 04/12] wip --- .github/workflows/run-tests.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 160ddbb..e9060ce 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,8 +1,6 @@ -name: Run unit tests +name: Run tests -on: - - push - - pull_request +on: [push, pull_request] jobs: test: @@ -17,11 +15,8 @@ jobs: include: - laravel: '7.0' testbench: '5.0' - - laravel: 8.* testbench: 6.* - - # Report coverage on edge test - laravel: '8.0' php: '8.0' stability: highest @@ -34,7 +29,6 @@ jobs: exclude: - laravel: '7.0' php: '8.0' - - laravel: '8.0' php: '8.0' stability: lowest From 35edbcd188674ff65235d157b6b6a9bf070bbb87 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:24:13 +0100 Subject: [PATCH 05/12] wip --- .github/workflows/run-tests.yml | 135 +++++++++++++------------------- 1 file changed, 56 insertions(+), 79 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e9060ce..e9a42fd 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -3,82 +3,59 @@ name: Run tests on: [push, pull_request] jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: true - matrix: - os: [ubuntu-latest] - php: [7.4, 8.0] - laravel: [7.*, 8.*] - dependency-version: [prefer-stable] - include: - - laravel: '7.0' - testbench: '5.0' - - laravel: 8.* - testbench: 6.* - - laravel: '8.0' - php: '8.0' - stability: highest - coverage: true - - stability: - - lowest - - highest - - exclude: - - laravel: '7.0' - php: '8.0' - - laravel: '8.0' - php: '8.0' - stability: lowest - - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - (${{ matrix.stability }}) - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: zip - coverage: pcov - - - name: Setup problem matchers - run: | - echo "::add-matcher::${{ runner.tool_cache }}/php.json" - echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Configure Laravel and Laravel Testbench - run: - composer require - "laravel/framework:${{ matrix.laravel }}" - "orchestra/testbench:${{ matrix.testbench }}" - --no-interaction - --no-update - - - name: Install Composer Dependencies - uses: ramsey/composer-install@v1 - with: - dependency-versions: ${{ matrix.stability }} - composer-options: "--ignore-platform-req=php" - - - name: Execute tests - id: phpunit - run: - vendor/bin/phpunit --coverage-clover=coverage.clover - - - name: Upload coverage to Ocular - continue-on-error: true - run: php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover - - - name: Determine coverage - uses: slavcodev/coverage-monitor-action@1.1.0 - if: github.event_name == 'pull_request' && matrix.coverage == true - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - clover_file: coverage.clover - threshold_alert: 75 - threshold_warning: 95 + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + php: [7.4, 8.0] + laravel: [7.*, 8.*] + dependency-version: [prefer-stable] + include: + - laravel: '7.0' + testbench: '5.0' + - laravel: 8.* + testbench: 6.* + - laravel: '8.0' + php: '8.0' + stability: highest + coverage: true + stability: + - lowest + - highest + exclude: + - laravel: '7.0' + php: '8.0' + - laravel: '8.0' + php: '8.0' + stability: lowest + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - (${{ matrix.stability }}) + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: zip + coverage: none + + - name: Configure Laravel and Laravel Testbench + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + + - name: Install Composer Dependencies + uses: ramsey/composer-install@v1 + with: + dependency-versions: ${{ matrix.stability }} + composer-options: "--ignore-platform-req=php" + + - name: Execute tests + id: phpunit + run: + vendor/bin/phpunit --coverage-clover=coverage.clover From 2c99e18e1a9f6787571fe1df37054dc06a4b2815 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:26:16 +0100 Subject: [PATCH 06/12] wip --- .github/workflows/run-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e9a42fd..9abcfa1 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -4,11 +4,10 @@ on: [push, pull_request] jobs: test: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: fail-fast: true matrix: - os: [ubuntu-latest] php: [7.4, 8.0] laravel: [7.*, 8.*] dependency-version: [prefer-stable] From 1fd0a7e4cbd406e397aac0adcbd8fe535a2d5d5e Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:29:45 +0100 Subject: [PATCH 07/12] wip --- .github/workflows/run-tests.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9abcfa1..5d30bc9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,12 +12,12 @@ jobs: laravel: [7.*, 8.*] dependency-version: [prefer-stable] include: - - laravel: '7.0' - testbench: '5.0' - - laravel: 8.* - testbench: 6.* - - laravel: '8.0' - php: '8.0' + - laravel: '7.*' + testbench: '5.*' + - laravel: '8.*' + testbench: '6.*' + - laravel: '8.*' + php: '8.*' stability: highest coverage: true stability: From c014fd3728feaebd45c6e12044ff4ff0c5c13a19 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:33:07 +0100 Subject: [PATCH 08/12] wip --- .github/workflows/run-tests.yml | 44 +++++++++------------------------ 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5d30bc9..c2b3cf0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,36 +1,24 @@ -name: Run tests +name: run-tests on: [push, pull_request] jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: - php: [7.4, 8.0] + os: [ubuntu-latest] + php: [7.4] laravel: [7.*, 8.*] dependency-version: [prefer-stable] include: - - laravel: '7.*' - testbench: '5.*' - - laravel: '8.*' - testbench: '6.*' - - laravel: '8.*' - php: '8.*' - stability: highest - coverage: true - stability: - - lowest - - highest - exclude: - - laravel: '7.0' - php: '8.0' - - laravel: '8.0' - php: '8.0' - stability: lowest + - laravel: 7.* + testbench: 5.* + - laravel: 8.* + testbench: 6.* - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - (${{ matrix.stability }}) + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} steps: - name: Checkout code @@ -40,21 +28,13 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: zip + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo coverage: none - - name: Configure Laravel and Laravel Testbench + - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - - name: Install Composer Dependencies - uses: ramsey/composer-install@v1 - with: - dependency-versions: ${{ matrix.stability }} - composer-options: "--ignore-platform-req=php" - - name: Execute tests - id: phpunit - run: - vendor/bin/phpunit --coverage-clover=coverage.clover + run: vendor/bin/phpunit \ No newline at end of file From dd8ef791ccd6e4a18dd84dc64092ed82bc1627e4 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:37:34 +0100 Subject: [PATCH 09/12] wip --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c2b3cf0..e88197a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -34,7 +34,10 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}" composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + env: + COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} - name: Execute tests run: vendor/bin/phpunit \ No newline at end of file From 17ca01f2881964831e9da17adae5d1c0f4fd1485 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 19:41:11 +0100 Subject: [PATCH 10/12] wip --- .php_cs.cache | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .php_cs.cache diff --git a/.php_cs.cache b/.php_cs.cache deleted file mode 100644 index 55b40ac..0000000 --- a/.php_cs.cache +++ /dev/null @@ -1 +0,0 @@ -{"php":"8.0.1","version":"2.18.2","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline","keep_multiple_spaces_after_comma":true},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sortAlgorithm":"alpha"},"no_unused_imports":true,"not_operator_with_successor_space":true,"trailing_comma_in_multiline_array":true,"phpdoc_scalar":true,"unary_operator_spaces":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["break","continue","declare","return","throw","try"]},"phpdoc_single_line_var_spacing":true,"phpdoc_var_without_name":true},"hashes":{"src\/BlueprintNovaAddonServiceProvider.php":493940480,"src\/Tasks\/AddTimestampFields.php":2123702612,"src\/Tasks\/AddIdentifierField.php":2788065737,"src\/Tasks\/RemapImports.php":2036426693,"src\/Tasks\/AddRegularFields.php":400311029,"src\/Tasks\/AddRelationshipFields.php":949953355,"src\/Tasks\/InteractWithRelationships.php":1857404547,"src\/HasStubPath.php":3584619922,"src\/Translators\/Rules.php":2952814748,"src\/Contracts\/Task.php":1649511144,"src\/NovaGenerator.php":1762550728,"tests\/RulesTranslatorTest.php":4126035691,"tests\/fixtures\/nova\/with-timezones.php":1313561587,"tests\/fixtures\/nova\/unconventional.php":1463634763,"tests\/fixtures\/nova\/model-configured.php":3109372952,"tests\/fixtures\/nova\/relationships.php":1900909876,"tests\/fixtures\/nova\/nested-components.php":2138509451,"tests\/fixtures\/nova\/model-configured-without-timestamps.php":174634294,"tests\/fixtures\/nova\/model-relationships.php":751021281,"tests\/fixtures\/nova\/nullable-relationships.php":2871191248,"tests\/fixtures\/nova\/readme-example.php":3905724907,"tests\/NovaGeneratorTest.php":803538511,"tests\/TestCase.php":2014583879}} \ No newline at end of file From 617e6f686e847838594dac3ed7d346f528711921 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 20:00:40 +0100 Subject: [PATCH 11/12] wip --- .gitignore | 3 ++- .php_cs.dist | 6 +++-- src/BlueprintNovaAddonServiceProvider.php | 12 +++++----- src/NovaGenerator.php | 24 +++++++++---------- tests/NovaGeneratorTest.php | 16 ++++++------- .../model-configured-without-timestamps.php | 2 +- tests/fixtures/nova/model-configured.php | 4 ++-- tests/fixtures/nova/model-relationships.php | 12 +++++----- tests/fixtures/nova/nested-components.php | 4 ++-- .../fixtures/nova/nullable-relationships.php | 4 ++-- tests/fixtures/nova/readme-example.php | 4 ++-- tests/fixtures/nova/relationships.php | 4 ++-- tests/fixtures/nova/unconventional.php | 6 ++--- tests/fixtures/nova/with-timezones.php | 2 +- 14 files changed, 53 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index 49c63d2..f59c8c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ composer.lock -/vendor \ No newline at end of file +/vendor +.php_cs.cache \ No newline at end of file diff --git a/.php_cs.dist b/.php_cs.dist index 0768361..9824961 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -2,6 +2,7 @@ $finder = Symfony\Component\Finder\Finder::create() ->notPath('vendor') + ->notPath('tests/fixtures/*') ->in([ __DIR__ . '/src', __DIR__ . '/tests', @@ -30,6 +31,7 @@ return PhpCsFixer\Config::create() 'method_argument_space' => [ 'on_multiline' => 'ensure_fully_multiline', 'keep_multiple_spaces_after_comma' => true, - ] + ], ]) - ->setFinder($finder); \ No newline at end of file + ->ex + ->setFinder($finder); diff --git a/src/BlueprintNovaAddonServiceProvider.php b/src/BlueprintNovaAddonServiceProvider.php index 1315085..57a2739 100644 --- a/src/BlueprintNovaAddonServiceProvider.php +++ b/src/BlueprintNovaAddonServiceProvider.php @@ -3,12 +3,12 @@ namespace Naoray\BlueprintNovaAddon; use Blueprint\Blueprint; -use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Support\ServiceProvider; -use Naoray\BlueprintNovaAddon\Tasks\AddIdentifierField; +use Illuminate\Contracts\Support\DeferrableProvider; use Naoray\BlueprintNovaAddon\Tasks\AddRegularFields; -use Naoray\BlueprintNovaAddon\Tasks\AddRelationshipFields; +use Naoray\BlueprintNovaAddon\Tasks\AddIdentifierField; use Naoray\BlueprintNovaAddon\Tasks\AddTimestampFields; +use Naoray\BlueprintNovaAddon\Tasks\AddRelationshipFields; class BlueprintNovaAddonServiceProvider extends ServiceProvider implements DeferrableProvider { @@ -19,7 +19,7 @@ public function boot() { if ($this->app->runningInConsole()) { $this->publishes([ - dirname(__DIR__).'/config/nova_blueprint.php' => config_path('nova_blueprint.php'), + dirname(__DIR__) . '/config/nova_blueprint.php' => config_path('nova_blueprint.php'), ], 'nova_blueprint'); } } @@ -30,8 +30,8 @@ public function boot() public function register() { $this->mergeConfigFrom( - dirname(__DIR__).'/config/nova_blueprint.php', - 'blueprint-nova-config' + dirname(__DIR__) . '/config/nova_blueprint.php', + 'blueprint-nova' ); $this->app->singleton(NovaGenerator::class, function ($app) { diff --git a/src/NovaGenerator.php b/src/NovaGenerator.php index 4132663..b4fd3d9 100644 --- a/src/NovaGenerator.php +++ b/src/NovaGenerator.php @@ -2,15 +2,15 @@ namespace Naoray\BlueprintNovaAddon; +use Blueprint\Tree; use Blueprint\Blueprint; -use Blueprint\Contracts\Generator; use Blueprint\Models\Model; -use Blueprint\Tree; -use Illuminate\Pipeline\Pipeline; use Illuminate\Support\Str; +use Illuminate\Pipeline\Pipeline; +use Blueprint\Contracts\Generator; use Naoray\BlueprintNovaAddon\Contracts\Task; -use Naoray\BlueprintNovaAddon\Tasks\AddTimestampFields; use Naoray\BlueprintNovaAddon\Tasks\RemapImports; +use Naoray\BlueprintNovaAddon\Tasks\AddTimestampFields; class NovaGenerator implements Generator { @@ -34,13 +34,13 @@ public function output(Tree $tree): array { $output = []; - $stub = $this->files->get($this->stubPath().DIRECTORY_SEPARATOR.'class.stub'); + $stub = $this->files->get($this->stubPath() . DIRECTORY_SEPARATOR . 'class.stub'); /** @var \Blueprint\Models\Model $model */ foreach ($tree->models() as $model) { $path = $this->getPath($model); - if (! $this->files->exists(dirname($path))) { + if (!$this->files->exists(dirname($path))) { $this->files->makeDirectory(dirname($path), 0755, true); } @@ -54,9 +54,9 @@ public function output(Tree $tree): array protected function getPath(Model $model): string { - $path = str_replace('\\', '/', Blueprint::relativeNamespace($this->getNovaNamespace($model).'/'.$model->name())); + $path = str_replace('\\', '/', Blueprint::relativeNamespace($this->getNovaNamespace($model) . '/' . $model->name())); - return config('blueprint.app_path').'/'.$path.'.php'; + return config('blueprint.app_path') . '/' . $path . '.php'; } protected function populateStub(string $stub, Model $model): string @@ -72,7 +72,7 @@ protected function populateStub(string $stub, Model $model): string $stub = str_replace('DummyNamespace', $this->getNovaNamespace($model), $stub); $stub = str_replace('DummyClass', $model->name(), $stub); - $stub = str_replace('DummyModel', '\\'.$model->fullyQualifiedClassName(), $stub); + $stub = str_replace('DummyModel', '\\' . $model->fullyQualifiedClassName(), $stub); $stub = str_replace('// fields...', $data['fields'], $stub); $stub = str_replace('use Illuminate\Http\Request;', implode(PHP_EOL, $data['imports']), $stub); @@ -82,10 +82,10 @@ protected function populateStub(string $stub, Model $model): string protected function getNovaNamespace(Model $model): string { $namespace = Str::after($model->fullyQualifiedNamespace(), config('blueprint.namespace')); - $namespace = config('blueprint.namespace').'\Nova'.$namespace; + $namespace = config('blueprint.namespace') . '\Nova' . $namespace; if (config('blueprint.models_namespace')) { - $namespace = str_replace('\\'.config('blueprint.models_namespace'), '', $namespace); + $namespace = str_replace('\\' . config('blueprint.models_namespace'), '', $namespace); } return $namespace; @@ -110,7 +110,7 @@ protected function filteredTasks(): array { $tasks = $this->tasks; - if (! config('nova_blueprint.timestamps')) { + if (!config('nova_blueprint.timestamps')) { $tasks = array_filter($tasks, function ($key) { return $key !== AddTimestampFields::class; }, ARRAY_FILTER_USE_KEY); diff --git a/tests/NovaGeneratorTest.php b/tests/NovaGeneratorTest.php index a75cfdf..ec93853 100644 --- a/tests/NovaGeneratorTest.php +++ b/tests/NovaGeneratorTest.php @@ -2,14 +2,14 @@ namespace Naoray\BlueprintNovaAddon\Tests; -use Blueprint\Blueprint; use Blueprint\Tree; +use Blueprint\Blueprint; use Naoray\BlueprintNovaAddon\HasStubPath; use Naoray\BlueprintNovaAddon\NovaGenerator; -use Naoray\BlueprintNovaAddon\Tasks\AddIdentifierField; use Naoray\BlueprintNovaAddon\Tasks\AddRegularFields; -use Naoray\BlueprintNovaAddon\Tasks\AddRelationshipFields; +use Naoray\BlueprintNovaAddon\Tasks\AddIdentifierField; use Naoray\BlueprintNovaAddon\Tasks\AddTimestampFields; +use Naoray\BlueprintNovaAddon\Tasks\AddRelationshipFields; class NovaGeneratorTest extends TestCase { @@ -44,7 +44,7 @@ protected function setUp(): void public function output_generates_nothing_for_empty_tree() { $this->files->expects('get') - ->with($this->stubPath().DIRECTORY_SEPARATOR.'class.stub') + ->with($this->stubPath() . DIRECTORY_SEPARATOR . 'class.stub') ->andReturn(file_get_contents('stubs/class.stub')); $this->files->shouldNotHaveReceived('put'); @@ -59,7 +59,7 @@ public function output_generates_nothing_for_empty_tree() public function output_generates_nova_resources($definition, $path, $novaResource) { $this->files->expects('get') - ->with($this->stubPath().DIRECTORY_SEPARATOR.'class.stub') + ->with($this->stubPath() . DIRECTORY_SEPARATOR . 'class.stub') ->andReturn(file_get_contents('stubs/class.stub')); $this->files->expects('exists') @@ -81,7 +81,7 @@ public function output_generates_nova_resources($definition, $path, $novaResourc public function output_generates_relationships() { $this->files->expects('get') - ->with($this->stubPath().DIRECTORY_SEPARATOR.'class.stub') + ->with($this->stubPath() . DIRECTORY_SEPARATOR . 'class.stub') ->andReturn(file_get_contents('stubs/class.stub')); $this->files->expects('exists') @@ -106,7 +106,7 @@ public function output_respects_blueprint_configurations() $this->app['config']->set('blueprint.models_namespace', 'Models'); $this->files->expects('get') - ->with($this->stubPath().DIRECTORY_SEPARATOR.'class.stub') + ->with($this->stubPath() . DIRECTORY_SEPARATOR . 'class.stub') ->andReturn(file_get_contents('stubs/class.stub')); $this->files->expects('exists') @@ -131,7 +131,7 @@ public function output_respects_packages_configuration() $this->app['config']->set('nova_blueprint.timestamps', false); $this->files->expects('get') - ->with($this->stubPath().DIRECTORY_SEPARATOR.'class.stub') + ->with($this->stubPath() . DIRECTORY_SEPARATOR . 'class.stub') ->andReturn(file_get_contents('stubs/class.stub')); $this->files->expects('exists') diff --git a/tests/fixtures/nova/model-configured-without-timestamps.php b/tests/fixtures/nova/model-configured-without-timestamps.php index 8b97a15..d9ad0a4 100644 --- a/tests/fixtures/nova/model-configured-without-timestamps.php +++ b/tests/fixtures/nova/model-configured-without-timestamps.php @@ -2,9 +2,9 @@ namespace App\Nova; +use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; use Laravel\Nova\Fields\BelongsTo; -use Laravel\Nova\Fields\ID; class Comment extends Resource { diff --git a/tests/fixtures/nova/model-configured.php b/tests/fixtures/nova/model-configured.php index 9224f3e..fa46198 100644 --- a/tests/fixtures/nova/model-configured.php +++ b/tests/fixtures/nova/model-configured.php @@ -2,10 +2,10 @@ namespace Some\App\Nova; +use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\BelongsTo; use Laravel\Nova\Fields\DateTime; -use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\BelongsTo; class Comment extends Resource { diff --git a/tests/fixtures/nova/model-relationships.php b/tests/fixtures/nova/model-relationships.php index a60e9d0..88c7984 100644 --- a/tests/fixtures/nova/model-relationships.php +++ b/tests/fixtures/nova/model-relationships.php @@ -2,15 +2,15 @@ namespace App\Nova; +use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\BelongsTo; -use Laravel\Nova\Fields\BelongsToMany; -use Laravel\Nova\Fields\DateTime; -use Laravel\Nova\Fields\HasMany; use Laravel\Nova\Fields\HasOne; -use Laravel\Nova\Fields\ID; -use Laravel\Nova\Fields\MorphMany; +use Laravel\Nova\Fields\HasMany; use Laravel\Nova\Fields\MorphTo; +use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\BelongsTo; +use Laravel\Nova\Fields\MorphMany; +use Laravel\Nova\Fields\BelongsToMany; class Subscription extends Resource { diff --git a/tests/fixtures/nova/nested-components.php b/tests/fixtures/nova/nested-components.php index 71d74d7..256e3c4 100644 --- a/tests/fixtures/nova/nested-components.php +++ b/tests/fixtures/nova/nested-components.php @@ -3,10 +3,10 @@ namespace App\Nova\Admin; use App\Nova\Resource; -use Illuminate\Http\Request; -use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\ID; +use Illuminate\Http\Request; use Laravel\Nova\Fields\Text; +use Laravel\Nova\Fields\DateTime; class User extends Resource { diff --git a/tests/fixtures/nova/nullable-relationships.php b/tests/fixtures/nova/nullable-relationships.php index fd74103..667c585 100644 --- a/tests/fixtures/nova/nullable-relationships.php +++ b/tests/fixtures/nova/nullable-relationships.php @@ -2,10 +2,10 @@ namespace App\Nova; +use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\BelongsTo; use Laravel\Nova\Fields\DateTime; -use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\BelongsTo; class Subscription extends Resource { diff --git a/tests/fixtures/nova/readme-example.php b/tests/fixtures/nova/readme-example.php index 7692e2b..36f8903 100644 --- a/tests/fixtures/nova/readme-example.php +++ b/tests/fixtures/nova/readme-example.php @@ -2,10 +2,10 @@ namespace App\Nova; -use Illuminate\Http\Request; -use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\ID; +use Illuminate\Http\Request; use Laravel\Nova\Fields\Text; +use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\Textarea; class Post extends Resource diff --git a/tests/fixtures/nova/relationships.php b/tests/fixtures/nova/relationships.php index f080c5a..3e30c3a 100644 --- a/tests/fixtures/nova/relationships.php +++ b/tests/fixtures/nova/relationships.php @@ -2,10 +2,10 @@ namespace App\Nova; +use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\BelongsTo; use Laravel\Nova\Fields\DateTime; -use Laravel\Nova\Fields\ID; +use Laravel\Nova\Fields\BelongsTo; class Comment extends Resource { diff --git a/tests/fixtures/nova/unconventional.php b/tests/fixtures/nova/unconventional.php index 92528c9..732c894 100644 --- a/tests/fixtures/nova/unconventional.php +++ b/tests/fixtures/nova/unconventional.php @@ -2,12 +2,12 @@ namespace App\Nova; +use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; -use Laravel\Nova\Fields\BelongsTo; use Laravel\Nova\Fields\Code; -use Laravel\Nova\Fields\DateTime; -use Laravel\Nova\Fields\ID; use Laravel\Nova\Fields\Text; +use Laravel\Nova\Fields\DateTime; +use Laravel\Nova\Fields\BelongsTo; class Team extends Resource { diff --git a/tests/fixtures/nova/with-timezones.php b/tests/fixtures/nova/with-timezones.php index e11a737..84a9caf 100644 --- a/tests/fixtures/nova/with-timezones.php +++ b/tests/fixtures/nova/with-timezones.php @@ -2,9 +2,9 @@ namespace App\Nova; +use Laravel\Nova\Fields\ID; use Illuminate\Http\Request; use Laravel\Nova\Fields\DateTime; -use Laravel\Nova\Fields\ID; class Comment extends Resource { From 915e33b971071573b8107a0cd5a3b06d85b05905 Mon Sep 17 00:00:00 2001 From: Krishan Koenig Date: Tue, 2 Feb 2021 20:03:01 +0100 Subject: [PATCH 12/12] wip --- .github/workflows/run-tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e88197a..1e7f9f3 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -34,10 +34,6 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}" - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - env: - COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} - name: Execute tests run: vendor/bin/phpunit \ No newline at end of file