-
-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (30 loc) · 1.02 KB
/
test.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
name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
docker:
image: docker:20.10.7
options: --privileged
strategy:
matrix:
php-version: [php81, php82, php83]
steps:
- uses: actions/checkout@v4
- name: Validate composer files
run: composer validate --strict
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Install dependencies
run: docker compose run --rm -v ${{ github.workspace }}/test-output:/app/test-output ${{ matrix.php-version }}composer composer install --prefer-dist
- name: Run tests
run: docker compose run --rm -v ${{ github.workspace }}/test-output:/app/test-output ${{ matrix.php-version }} vendor/bin/phpunit