|
6 | 6 | on: pull_request |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - phpstan: |
10 | | - name: PHPStan static analysis |
| 9 | + test-suite: |
| 10 | + name: Test suite |
11 | 11 | runs-on: ubuntu-latest |
12 | 12 | steps: |
13 | | - - name: Checkout |
14 | | - uses: actions/checkout@v5 |
| 13 | + - uses: actions/checkout@v5 |
15 | 14 |
|
16 | | - - name: Create docker network |
| 15 | + - name: Install Task |
| 16 | + uses: go-task/setup-task@v1 |
| 17 | + |
| 18 | + - name: Setup docker network |
17 | 19 | run: | |
18 | 20 | docker network create frontend |
19 | 21 |
|
20 | | - - name: Run phpstan |
| 22 | + - name: Install Site |
| 23 | + run: | |
| 24 | + task site:install |
| 25 | +
|
| 26 | + - name: Test suite |
21 | 27 | run: | |
22 | | - docker compose run --rm phpfpm composer install |
23 | | - docker compose run --rm phpfpm vendor/bin/phpstan analyse src --no-progress --error-format=github --memory-limit=1G |
| 28 | + task test:setup |
| 29 | + task test |
24 | 30 |
|
25 | | - phpunit: |
26 | | - name: PHP Unit tests |
| 31 | + - name: Upload coverage to Codecov test |
| 32 | + uses: codecov/codecov-action@v5 |
| 33 | + with: |
| 34 | + files: ./coverage/unit.xml |
| 35 | + flags: unittests |
| 36 | + env: |
| 37 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 38 | + |
| 39 | + phpstan: |
| 40 | + name: PHPStan |
27 | 41 | runs-on: ubuntu-latest |
28 | 42 | steps: |
29 | | - - name: Checkout |
30 | | - uses: actions/checkout@v5 |
| 43 | + - uses: actions/checkout@v5 |
31 | 44 |
|
32 | | - - name: Install site |
| 45 | + - name: Install Task |
| 46 | + uses: go-task/setup-task@v1 |
| 47 | + |
| 48 | + - name: Start docker compose setup |
33 | 49 | run: | |
34 | 50 | docker network create frontend |
35 | | - docker compose pull |
36 | | - docker compose up --detach |
37 | | - docker compose exec --user=root phpfpm composer install |
38 | | - docker compose exec phpfpm bin/console doctrine:migrations:migrate --no-interaction |
| 51 | + task compose -- up --detach |
| 52 | +
|
| 53 | + - name: Install Dependencies |
| 54 | + run: | |
| 55 | + task composer -- install |
39 | 56 |
|
40 | | - - name: Run tests |
| 57 | + - name: Run PHPStan |
41 | 58 | run: | |
42 | | - docker compose exec phpfpm composer run tests |
| 59 | + task code-analysis:phpstan |
43 | 60 |
|
44 | 61 | fixtures: |
45 | 62 | name: Load fixtures |
46 | 63 | runs-on: ubuntu-latest |
47 | 64 | steps: |
48 | | - - name: Checkout |
49 | | - uses: actions/checkout@v5 |
50 | | - with: |
51 | | - fetch-depth: 2 |
| 65 | + - uses: actions/checkout@v5 |
| 66 | + |
| 67 | + - name: Install Task |
| 68 | + uses: go-task/setup-task@v1 |
52 | 69 |
|
53 | | - - name: Install site |
| 70 | + - name: Setup docker network |
54 | 71 | run: | |
55 | 72 | docker network create frontend |
56 | | - docker compose pull |
57 | | - docker compose up --detach |
58 | | - docker compose exec --user=root phpfpm composer install |
59 | | - docker compose exec phpfpm bin/console doctrine:migrations:migrate --no-interaction |
| 73 | +
|
| 74 | + - name: Install Site |
| 75 | + run: | |
| 76 | + task site:install |
60 | 77 |
|
61 | 78 | - name: Load fixtures |
62 | 79 | run: | |
|
0 commit comments