-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 2.02 KB
/
tests.yaml
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
52
53
54
55
56
57
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start stack
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml pull --include-deps
docker compose -f compose.yaml -f compose.tests.yaml build
docker compose -f compose.yaml -f compose.tests.yaml up -d
- name: Install vendors
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer install --no-ansi --no-interaction --no-progress --prefer-dist
- name: Install tools
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app composer phive:install --no-interaction --no-progress --no-ansi
- name: Initialize database
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app bin/console messenger:setup-transports
docker compose -f compose.yaml -f compose.tests.yaml exec app bin/console doctrine:migration:migrate -n
docker compose -f compose.yaml -f compose.tests.yaml exec app bin/console doctrine:schema:validate -v
- name: PHP-CS-Fixer
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app tools/php-cs-fixer.phar fix --no-ansi --dry-run --diff
- name: PHPStan
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app vendor/bin/phpstan --no-ansi analyze --configuration phpstan.test.neon
- name: Rector
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app vendor/bin/rector --no-ansi --dry-run
- name: Tests
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml exec app tools/phpunit.phar
- name: Stop stack
if: always()
shell: bash
run: |
docker compose -f compose.yaml -f compose.tests.yaml down