-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (41 loc) · 1.23 KB
/
unit_tests.yml
File metadata and controls
51 lines (41 loc) · 1.23 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
50
51
name: Unit Tests
on: [ push, pull_request, workflow_dispatch ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
php: ["7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"]
name: Tests Under PHP ${{ matrix.php }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- name: Install Composer Dependencies
uses: nick-invision/retry@v4
with:
timeout_minutes: 5
max_attempts: 5
command: COMPOSER_NO_AUDIT=1 composer update -nq --no-progress
- name: Start Docker Containers
uses: hoverkraft-tech/compose-action@v2
with:
up-flags: --build
env:
PHP_VERSION: ${{ matrix.php }}
- name: Run Unit Tests
run: |
set -ex
sleep 2 # Give the containers enough time to warm up before running unit tests.
docker compose exec -T php bash -c "./vendor/bin/phpunit"