-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (23 loc) · 1.06 KB
/
Copy pathtests.yaml
File metadata and controls
32 lines (23 loc) · 1.06 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
name: Tests
env:
COMPOSE_USER: runner
on:
pull_request:
jobs:
phpunit:
name: PHPUnit + coverage gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Create docker network
run: docker network create frontend
- name: Install dependencies
run: docker compose run --rm phpfpm composer install
- name: Build Tailwind CSS
run: docker compose run --rm phpfpm bin/console tailwind:build
- name: Create the test database
run: docker compose run --rm phpfpm bin/console --env=test doctrine:database:create --if-not-exists --no-interaction
- name: Run PHPUnit with coverage
run: docker compose run -e XDEBUG_MODE=coverage --rm phpfpm vendor/bin/phpunit --bootstrap=tests/bootstrap_integration.php --coverage-clover=coverage/clover.xml
- name: Enforce coverage threshold (100%)
run: docker compose run --rm phpfpm vendor/bin/coverage-check coverage/clover.xml 100