Skip to content

Commit 1cbb499

Browse files
committed
ci: refresh the tests workflow
1 parent deebd0d commit 1cbb499

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,35 @@ jobs:
66
test-php:
77
name: Test on php ${{ matrix.php-version }} and ${{ matrix.os }}
88
runs-on: ${{ matrix.os }}
9+
continue-on-error: ${{ matrix.experimental }}
910
strategy:
1011
matrix:
11-
php-version: ["7.1", "7.2", "7.3", "7.4", "8.0"]
12+
php-version: ["7.2", "7.3", "7.4", "8.0"]
1213
os: [ubuntu-latest]
14+
experimental: [false]
15+
composer-options: ['']
16+
include:
17+
- { php-version: '8.1', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-reqs' }
1318
steps:
1419
- uses: actions/checkout@v2
1520
- name: Use php ${{ matrix.php-version }}
1621
uses: shivammathur/setup-php@v2
1722
with:
1823
php-version: ${{ matrix.php-version }}
19-
extensions: posix, mbstring
20-
coverage: xdebug
21-
tools: composer:v2
22-
- name: Cache module
24+
coverage: pcov
25+
- name: Get Composer Cache Directory
26+
id: composer-cache
27+
run: |
28+
echo "::set-output name=dir::$(composer config cache-files-dir)"
29+
- name: Restore cache
2330
uses: actions/cache@v2
2431
with:
25-
path: ~/.composer/cache/
26-
key: composer-cache
32+
path: ${{ steps.composer-cache.outputs.dir }}
33+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-composer-
2736
- name: Install dependencies
28-
if: ${{ matrix.php-version != '8.0' }}
29-
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest
30-
- name: Install dependencies for php 8.0
31-
if: ${{ matrix.php-version == '8.0' }}
32-
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
37+
run: composer install --no-interaction ${{ matrix.composer-options }}
3338
- name: Run php tests
3439
run: composer run phpunit
3540
- name: Send coverage

0 commit comments

Comments
 (0)