-
-
Notifications
You must be signed in to change notification settings - Fork 5
56 lines (47 loc) · 1.31 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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Tests
on:
push:
branches:
- 'develop'
- 'trunk'
pull_request:
branches:
- '**'
jobs:
build:
strategy:
matrix:
php:
- '8.4'
- '8.0'
fail-fast: false
name: Tests / PHP ${{ matrix.php }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-file: development
coverage: none
tools: parallel-lint
- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- name: Cache PHP Dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('composer.json') }}
- name: Check source code for syntax errors
run: composer exec --no-interaction -- parallel-lint bin/ src/ tests/
- name: Install PHP Dependencies
run: |
composer install --prefer-dist --no-progress --no-interaction
- name: Run the tests
run: |
composer test