-
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (42 loc) · 1.09 KB
/
tests.yml
File metadata and controls
49 lines (42 loc) · 1.09 KB
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
name: Tests
on:
push:
branches:
- 'develop'
- 'trunk'
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
php: ['7.2', '7.4', '8.0', '8.1']
fail-fast: false
name: Unit tests
runs-on: ubuntu-18.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install PHP
uses: shivammathur/setup-php@2.19.1
with:
php-version: ${{ matrix.php }}
ini-file: development
coverage: none
- name: Get Composer Cache Directory
id: composer-cache-dir
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache PHP Dependencies
id: composer-cache
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }}
- name: Install PHP Dependencies
run: |
composer install --prefer-dist --no-progress --no-interaction
- name: Run the tests
run: |
composer test:phpunit