-
Notifications
You must be signed in to change notification settings - Fork 1
144 lines (120 loc) · 4.3 KB
/
Copy pathtests.yml
File metadata and controls
144 lines (120 loc) · 4.3 KB
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
name: Tests
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Lowest PHP, Lowest Compatible Symfony, Lowest Composer
- php: '8.2'
symfony_constraint: '^6.0'
composer_version: '2.2'
name_suffix: ' (PHP 8.2, Symfony 6.x, Composer 2.2)'
# PHP 8.2, Symfony 6.x, Highest Composer
- php: '8.2'
symfony_constraint: '^6.0'
composer_version: '2.9'
name_suffix: ' (PHP 8.2, Symfony 6.x, Composer 2.9)'
# PHP 8.3, Symfony 6.x, Lowest Composer
- php: '8.3'
symfony_constraint: '^6.0'
composer_version: '2.2'
name_suffix: ' (PHP 8.3, Symfony 6.x, Composer 2.2)'
# PHP 8.3, Symfony 7.x, Highest Composer
- php: '8.3'
symfony_constraint: '^7.0'
composer_version: '2.9'
name_suffix: ' (PHP 8.3, Symfony 7.x, Composer 2.9)'
# PHP 8.4, Symfony 7.x, Lowest Compatible Composer (2.4, since 2.2/2.3 are excluded for PHP 8.4)
- php: '8.4'
symfony_constraint: '^7.0'
composer_version: '2.4'
name_suffix: ' (PHP 8.4, Symfony 7.x, Composer 2.4)'
# PHP 8.4, Symfony 7.x, Highest Composer
- php: '8.4'
symfony_constraint: '^7.0'
composer_version: '2.9'
name_suffix: ' (PHP 8.4, Symfony 7.x, Composer 2.9)'
# Highest PHP, Symfony 7.x, Lowest Compatible Composer (2.4, since 2.2/2.3 are excluded for PHP 8.4)
- php: '8.5'
symfony_constraint: '^7.0'
composer_version: '2.4'
name_suffix: ' (PHP 8.5, Symfony 7.x, Composer 2.4)'
# Highest PHP, Symfony 7.x, Highest Composer
- php: '8.5'
symfony_constraint: '^7.0'
composer_version: '2.9'
name_suffix: ' (PHP 8.5, Symfony 7.x, Composer 2.9)'
# Highest PHP, Highest Symfony, Lowest Compatible Composer (2.4, since 2.2/2.3 are excluded for PHP 8.4)
- php: '8.5'
symfony_constraint: '^8.0'
composer_version: '2.4'
name_suffix: ' (PHP 8.5, Symfony 8.x, Composer 2.4)'
# Highest PHP, Highest Symfony, Highest Composer
- php: '8.5'
symfony_constraint: '^8.0'
composer_version: '2.9'
name_suffix: ' (PHP 8.5, Symfony 8.x, Composer 2.9)'
name: Test ${{ matrix.name_suffix }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: libxml, simplexml
tools: composer:${{ matrix.composer_version }}
- name: Install Composer dependencies
run: composer update --no-interaction --no-progress --no-suggest --with=symfony/config:${{ matrix.symfony_constraint }}
- name: Run PHPUnit tests
run: composer test
coverage:
runs-on: ubuntu-latest
name: Code Coverage Report
needs: tests
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: libxml, simplexml, xdebug
tools: composer:'2.9'
- name: Install Composer dependencies
run: composer update --no-interaction --no-progress --no-suggest
env:
SYMFONY_REQUIRE: '^7.0'
- name: Run PHPUnit tests with coverage
run: composer test:coverage
- name: Upload coverage report
uses: actions/upload-artifact@v7
with:
name: code-coverage-report
path: .build/coverage/clover.xml
retention-days: 5
coverage-report:
name: Report test coverage
runs-on: ubuntu-latest
needs: coverage
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Download coverage artifact
id: download
uses: actions/download-artifact@v8
with:
name: code-coverage-report
- name: Coveralls report
uses: coverallsapp/github-action@v2
with:
file: ${{ steps.download.outputs.download-path }}/clover.xml