|
8 | 8 |
|
9 | 9 | pull_request: |
10 | 10 |
|
11 | | - schedule: |
12 | | - - cron: '20 16 * * SUN' |
13 | | - |
14 | 11 | jobs: |
15 | 12 |
|
16 | 13 | tests: |
17 | 14 |
|
18 | | - name: PHPUnit (PHP ${{ matrix.php-version }}) ${{ matrix.lowest-dependencies && '(lowest deps)' || '' }} |
| 15 | + name: PHPUnit (PHP ${{ matrix.php-version }}) (${{ matrix.dependencies }} dependencies) |
19 | 16 | runs-on: ubuntu-latest |
20 | 17 | strategy: |
21 | 18 | fail-fast: false |
22 | 19 | matrix: |
23 | | - lowest-dependencies: [true, false] |
24 | | - php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] |
25 | | - include: |
26 | | - - php-version: '7.4' |
27 | | - lowest-dependencies: false |
28 | | - coverage: true |
29 | | - env: |
30 | | - COMPOSER_FLAGS: ${{ matrix.lowest-dependencies && '--prefer-lowest' || '' }} |
| 20 | + php-version: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] |
| 21 | + dependencies: ['lowest', 'highest'] |
31 | 22 |
|
32 | 23 | steps: |
33 | 24 |
|
34 | 25 | - name: Checkout |
35 | | - uses: actions/checkout@v2 |
| 26 | + uses: actions/checkout@v4 |
36 | 27 |
|
37 | 28 | - name: Setup PHP |
38 | 29 | uses: shivammathur/setup-php@v2 |
39 | 30 | with: |
40 | 31 | php-version: ${{ matrix.php-version }} |
41 | | - coverage: ${{ matrix.coverage && 'pcov' || 'none' }} |
42 | | - |
43 | | - - name: Determine Composer cache directory |
44 | | - id: composercache |
45 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
46 | | - |
47 | | - - name: Load Composer cache |
48 | | - uses: actions/cache@v2 |
49 | | - with: |
50 | | - path: ${{ steps.composercache.outputs.dir }} |
51 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} |
52 | | - restore-keys: ${{ runner.os }}-composer- |
| 32 | + coverage: none |
53 | 33 |
|
54 | 34 | - name: Install Composer dependencies |
55 | | - run: | |
56 | | - composer update --no-interaction --prefer-dist ${{ env.COMPOSER_FLAGS }} |
57 | | - composer update --no-interaction --prefer-dist --with-all-dependencies phpunit/phpunit |
| 35 | + uses: ramsey/composer-install@v2 |
| 36 | + with: |
| 37 | + dependency-versions: ${{ matrix.dependencies }} |
58 | 38 |
|
59 | 39 | - name: Run PHPUnit |
60 | | - run: vendor/bin/phpunit --testdox ${{ !matrix.coverage && '--no-coverage' || '--coverage-clover coverage.xml' }} |
61 | | - |
62 | | - - name: Upload coverage to Codecov |
63 | | - uses: codecov/codecov-action@v1 |
64 | | - if: ${{ matrix.coverage }} |
65 | | - with: |
66 | | - file: ./coverage.xml |
| 40 | + run: vendor/bin/phpunit --testdox |
0 commit comments