-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (44 loc) · 1.27 KB
/
main.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
45
on:
pull_request: ~
push:
branches:
- master
jobs:
tests:
name: Test (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: 7.4
symfony: "^4.4"
- php: 8.1
symfony: "^5.4"
- php: 8.2
symfony: "^5.4"
- php: 8.3
symfony: "^6.4"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker compose
run: docker compose up -d
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Restrict Symfony version
if: matrix.symfony
run: rm composer.lock && composer require "symfony/symfony:${{ matrix.symfony }}" --no-update
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: Docker compose wait
run: docker compose up --wait crossbar
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: build/coverage-report.xml
fail_ci_if_error: true