-
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (46 loc) · 1.4 KB
/
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
54
55
56
57
name: Tests
on:
pull_request:
push:
branches-ignore: [master]
jobs:
unit-tests:
name: PHP ${{ matrix.php }}, ${{ matrix.stability }}
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.2', '8.3']
stability: [prefer-lowest, prefer-stable]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '21.3'
- name: Get Composer cache directory path
id: composer-cache-dir
run: echo "::set-output name=path::$(composer config cache-files-dir)"
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache-dir.outputs.path }}
key: composer-${{ hashFiles('composer.lock') }}
restore-keys: composer-
- name: Node assertions cache
uses: actions/cache@v3
with:
path: .cache/node-assertions
key: node-assertions-${{ github.sha }}
restore-keys: node-assertions-
- name: Install Composer dependencies
run: composer update --${{ matrix.stability }}
- name: Execute tests
run: vendor/bin/phpunit