-
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (39 loc) · 1.12 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Unit Test
on:
pull_request: null
push:
branches:
- master
env:
COMPOSER_ROOT_VERSION: dev-master
jobs:
prepare_env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: composer-versions-matrix
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
outputs:
php: ${{ steps.composer-versions-matrix.outputs.version }}
extensions: ${{ steps.composer-versions-matrix.outputs.extensions }}
unit_tests:
needs: prepare_env
strategy:
fail-fast: false
matrix:
php: ${{ fromJson(needs.prepare_env.outputs.php) }}
name: Test on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ join(fromJson(needs.prepare_env.outputs.extensions), ', ') }}
coverage: none
- name: Composer install
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist"
- name: Unit test
run: make test-phpunit