Skip to content

Commit e8faf48

Browse files
committed
Added phpunit workflow
1 parent 8b0e4f8 commit e8faf48

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

.github/workflows/phpunit.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: PHPUnit
2+
3+
env:
4+
COMPOSE_USER: runner
5+
COMPOSE_DOMAIN: ci.local
6+
7+
on:
8+
pull_request:
9+
push:
10+
branches:
11+
- main
12+
- develop
13+
paths:
14+
- "**/*.php"
15+
- "phpunit.xml.dist"
16+
- "composer.json"
17+
- "composer.lock"
18+
- "docker-compose.yml"
19+
- "docker-compose.postgres.yml"
20+
- "docker-compose.php85.yml"
21+
- "docker/**"
22+
- ".github/workflows/phpunit.yaml"
23+
24+
jobs:
25+
phpunit:
26+
name: PHPUnit (${{ matrix.database }})
27+
runs-on: ubuntu-latest
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
include:
32+
- database: mariadb
33+
compose-files: "-f docker-compose.yml"
34+
- database: postgres
35+
compose-files: "-f docker-compose.yml -f docker-compose.postgres.yml"
36+
steps:
37+
- uses: actions/checkout@v6
38+
39+
- name: Create docker network
40+
run: docker network create frontend
41+
42+
- name: Install dependencies
43+
run: docker compose ${{ matrix.compose-files }} run --rm phpfpm composer install
44+
45+
- name: Run test suite
46+
run: docker compose ${{ matrix.compose-files }} run --rm phpfpm vendor/bin/phpunit

0 commit comments

Comments
 (0)