-
Notifications
You must be signed in to change notification settings - Fork 280
75 lines (64 loc) · 1.81 KB
/
tests.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
pull_request:
defaults:
run:
shell: bash
jobs:
static_analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: '8.2'
- name: Install dependencies
run: composer update --ansi --no-progress --prefer-dist --no-interaction
- run: vendor/bin/phpstan analyze
tests:
name: Tests
runs-on: ubuntu-20.04
strategy:
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
composer_flags: [ '' ]
minimum_stability: [ '' ]
symfony_deprecations_helper: [ '' ]
include:
- php: '7.2'
composer_flags: '--prefer-lowest --prefer-stable'
symfony_deprecations_helper: weak
- php: '8.0'
minimum_stability: dev
- php: '7.4'
minimum_stability: dev
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "xdebug"
php-version: "${{ matrix.php }}"
tools: composer
- name: Configure for minimum stability
if: "${{ matrix.minimum_stability == 'dev' }}"
run: |
composer config minimum-stability dev
- name: Install dependencies
run: |
composer update ${{ matrix.composer_flags }}
- name: Run tests
run: |
export SYMFONY_DEPRECATIONS_HELPER="${{ matrix.symfony_deprecations_helper }}"
vendor/bin/phpunit -v --coverage-clover=coverage.xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: coverage.xml