Skip to content

Commit 7482e1f

Browse files
committed
Update CI workflow
1 parent 994f010 commit 7482e1f

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ name: Tests
22
on: [push, pull_request]
33
jobs:
44
php:
5-
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} Composer ${{ matrix.composer }}
5+
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }} Composer ${{ matrix.composer }} (${{ matrix.dependencies }})
66
runs-on: ${{ matrix.operating-system }}
77
strategy:
88
fail-fast: false
99
matrix:
1010
operating-system: [ubuntu-latest]
1111
composer: [v2]
12+
dependencies: [highest]
1213
php-versions:
1314
- '5.3'
1415
- '5.4'
@@ -24,44 +25,37 @@ jobs:
2425
- '8.2'
2526
- '8.3'
2627
include:
27-
- php-versions: '7.0'
28-
composer-flags: '--prefer-lowest'
29-
composer: v1
30-
operating-system: ubuntu-latest
3128
- php-versions: '5.3'
32-
composer-flags: '--prefer-lowest'
29+
dependencies: 'lowest'
3330
composer: v1 # Global composer should be in same version as locally installed one
3431
operating-system: ubuntu-latest
32+
- php-versions: '7.0'
33+
dependencies: 'lowest'
34+
composer: v1
35+
operating-system: ubuntu-latest
3536
- php-versions: '8.2'
3637
composer: v2
3738
operating-system: windows-latest
3839
steps:
3940
- name: Checkout
40-
uses: actions/checkout@v2
41+
uses: actions/checkout@v3
4142
- name: Setup PHP, with composer and extensions
4243
uses: shivammathur/setup-php@v2
4344
with:
4445
php-version: ${{ matrix.php-versions }}
4546
extensions: json
4647
coverage: xdebug
4748
tools: composer:${{ matrix.composer }}
48-
- name: Get composer cache directory
49-
id: composer-cache
50-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
51-
- name: Cache composer dependencies
52-
uses: actions/cache@v1
49+
- name: Install Composer dependencies (${{ matrix.dependencies }})
50+
uses: ramsey/composer-install@v2
5351
with:
54-
path: ${{ steps.composer-cache.outputs.dir }}
55-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
56-
restore-keys: ${{ runner.os }}-composer-
57-
- name: Install Composer dependencies
58-
run: composer update -n --prefer-dist ${{ matrix.composer-flags }}
52+
dependency-versions: ${{ matrix.dependencies }}
5953
- name: Set default branch for tests
6054
run: git config --global init.defaultBranch main
6155
- name: Run Tests
6256
run: vendor/bin/simple-phpunit --coverage-clover coverage.xml --coverage-text
6357
- name: Upload coverage to Codecov
64-
uses: codecov/codecov-action@v1
58+
uses: codecov/codecov-action@v3
6559
- name: Run mutation tests
6660
if: ${{ matrix.php-versions == 8.2 && matrix.operating-system == 'ubuntu-latest' }}
6761
env:

0 commit comments

Comments
 (0)