|
| 1 | +name: "Code check" |
| 2 | + |
1 | 3 | on:
|
2 |
| - pull_request: |
| 4 | + workflow_call: |
3 | 5 | push:
|
4 | 6 | branches:
|
5 |
| - - "*" |
6 |
| - - "!gh-pages" |
| 7 | + - "main" |
| 8 | + |
| 9 | + pull_request: |
| 10 | + paths: |
| 11 | + - "src/**" |
| 12 | + - "tests/**" |
| 13 | + - "composer.json" |
| 14 | + - "ecs.php" |
| 15 | + - "rector.php" |
| 16 | + - "phpstan.neon" |
| 17 | + - "phpunit.xml" |
| 18 | + |
| 19 | +concurrency: |
| 20 | + group: php-get-typed-value-check-${{ github.ref }} |
| 21 | + cancel-in-progress: true |
7 | 22 |
|
8 | 23 | jobs:
|
9 |
| - run: |
10 |
| - uses: wrk-flow/reusable-workflows/.github/workflows/php-check.yml@main |
| 24 | + code: |
| 25 | + name: "Code check" |
| 26 | + uses: wrk-flow/reusable-workflows/.github/workflows/php-check.yml@7562253bdc3769847417e3476b501e7126f5d2c0 |
11 | 27 | secrets: inherit
|
12 |
| - with: |
13 |
| - gistID: 11b884c06da0bf9116ae763d23438ecb |
14 |
| - |
15 |
| - without-laravel: |
16 |
| - name: "Tests without laravel" |
17 |
| - runs-on: "ubuntu-latest" |
18 | 28 |
|
| 29 | + tests: |
| 30 | + name: "Run tests" |
19 | 31 | strategy:
|
20 |
| - fail-fast: false |
21 | 32 | matrix:
|
22 |
| - php-version: |
23 |
| - - "8.1" |
24 |
| - dependencies: |
25 |
| - - "lowest" |
26 |
| - - "highest" |
27 |
| - |
28 |
| - steps: |
29 |
| - - name: "Checkout" |
30 |
| - uses: actions/checkout@v3 |
31 |
| - |
32 |
| - - name: "Install PHP" |
33 |
| - uses: "shivammathur/setup-php@v2" |
34 |
| - with: |
35 |
| - php-version: "${{ matrix.php-version }}" |
36 |
| - |
37 |
| - - name: "Install lowest dependencies" |
38 |
| - if: ${{ matrix.dependencies == 'lowest' }} |
39 |
| - run: "composer update --prefer-lowest --no-interaction --no-progress" |
40 |
| - |
41 |
| - - name: "Install highest dependencies" |
42 |
| - if: ${{ matrix.dependencies == 'highest' }} |
43 |
| - run: "composer update --no-interaction --no-progress" |
44 |
| - |
45 |
| - - name: "Remove Laravel" |
46 |
| - run: "composer remove --dev laravel/framework orchestra/testbench" |
47 |
| - |
48 |
| - - name: "Remove Laravel tests" |
49 |
| - run: "rm -rf tests/Laravel" |
50 |
| - |
51 |
| - - name: "Tests" |
52 |
| - id: tests |
53 |
| - continue-on-error: false |
54 |
| - run: | |
55 |
| - vendor/bin/phpunit |
| 33 | + phpVersion: [ "8.1", "8.2" ] |
| 34 | + uses: wrk-flow/reusable-workflows/.github/workflows/php-tests.yml@91be5bbf6aca80f54548ec1bddc7c9ced6efb78f |
| 35 | + with: |
| 36 | + gistID: ${{ vars.GIST_ID }} |
| 37 | + gistOnPhpVersion: "8.2" |
| 38 | + phpVersion: "${{ matrix.phpVersion }}" |
| 39 | + secrets: inherit |
56 | 40 |
|
| 41 | + tests_no_frameworks: |
| 42 | + name: "Run tests without Frameworks" |
| 43 | + strategy: |
| 44 | + matrix: |
| 45 | + phpVersion: [ "8.1", "8.2" ] |
| 46 | + uses: wrk-flow/reusable-workflows/.github/workflows/php-tests.yml@91be5bbf6aca80f54548ec1bddc7c9ced6efb78f |
| 47 | + with: |
| 48 | + phpVersion: "${{ matrix.phpVersion }}" |
| 49 | + composerRemove: "--dev laravel/framework orchestra/testbench" |
| 50 | + dirsRemove: "tests/Laravel" |
57 | 51 |
|
0 commit comments