-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (37 loc) · 992 Bytes
/
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
name: "Tests"
on: [pull_request]
jobs:
tests:
name: Unit & E2E
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [
'8.0',
'8.1',
'8.2',
'8.3'
]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: recursive
- run: git checkout HEAD^2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build image
uses: docker/build-push-action@v3
with:
context: .
file: php-${{ matrix.php-versions }}.Dockerfile
push: false
tags: websocket-dev
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Start Servers
run: docker compose up -d && sleep 10
- name: Run Tests
run: PHP_VERSION=${{ matrix.php-versions }} docker compose exec tests vendor/bin/phpunit