-
Notifications
You must be signed in to change notification settings - Fork 172
156 lines (138 loc) · 4.1 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: CI
on:
pull_request:
push:
branches:
- master
- release/**
permissions:
contents: read
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
strategy:
fail-fast: false
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
symfony-version:
- 4.4.*
- 5.*
- 6.*
- 7.*
dependencies:
- highest
exclude:
- php: '7.2'
symfony-version: 6.*
- php: '7.3'
symfony-version: 6.*
- php: '7.4'
symfony-version: 6.*
- php: '7.2'
symfony-version: 7.*
- php: '7.3'
symfony-version: 7.*
- php: '7.4'
symfony-version: 7.*
- php: '8.0'
symfony-version: 7.*
- php: '8.1'
symfony-version: 7.*
- php: '8.4'
symfony-version: 4.4.*
include:
- php: '7.2'
symfony-version: 4.4.*
dependencies: lowest
- php: '7.2'
symfony-version: 5.*
dependencies: lowest
- php: '8.0'
symfony-version: 6.*
dependencies: lowest
- php: '8.2'
symfony-version: 7.*
dependencies: lowest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: flex
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
# These dependencies are not used running the tests but can cause deprecation warnings so we remove them before running the tests
- name: Remove unused dependencies
run: composer remove vimeo/psalm phpstan/phpstan friendsofphp/php-cs-fixer --dev --no-interaction --no-update
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --prefer-dist
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
file: build/coverage-report.xml
token: ${{ secrets.CODECOV_TOKEN }}
missing-optional-packages-tests:
name: Tests without optional packages
runs-on: ubuntu-latest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
strategy:
fail-fast: false
matrix:
include:
- php: '7.2'
dependencies: lowest
symfony-version: 4.4.*
- php: '7.4'
dependencies: highest
- php: '8.0'
dependencies: lowest
symfony-version: 4.4.*
- php: '8.4'
dependencies: highest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: flex
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Remove optional packages
run: composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger symfony/twig-bundle symfony/cache symfony/http-client --dev --no-update
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: --prefer-dist
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
file: build/coverage-report.xml
token: ${{ secrets.CODECOV_TOKEN }}