-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
test.yaml.twig
100 lines (84 loc) · 3.45 KB
/
test.yaml.twig
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
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.
name: Test
on:
schedule:
- cron: '30 0 * * *'
push:
branches:
{% for branch in project.branchesReverse %}
- {{ branch.name }}
{% endfor %}
pull_request:
permissions:
contents: read
jobs:
test:
name: PHP {% verbatim %}${{ matrix.php-version }} + ${{ matrix.dependencies }} + ${{ matrix.variant }}{% endverbatim %}
runs-on: ubuntu-latest
continue-on-error: {% verbatim %}${{ matrix.allowed-to-fail }}{% endverbatim %}
env:
SYMFONY_REQUIRE: {% verbatim %}${{matrix.symfony-require}}{% endverbatim %}
{% if branch.hasPhpExtension('mongodb') %}
services:
mongo:
image: mongo
ports:
- 27017:27017
{% endif %}
strategy:
matrix:
php-version:
{% for phpVersion in branch.phpVersions %}
- '{{ phpVersion.toString }}'
{% endfor %}
dependencies: [highest]
allowed-to-fail: [false]
symfony-require: ['']
variant: [normal]
include:
- php-version: '{{ branch.lowestPhpVersion.toString }}'
dependencies: lowest
allowed-to-fail: false
variant: normal
{% for variant in branch.variants|filter(v => v.package != 'symfony/symfony') %}
- php-version: '{{ branch.targetPhpVersion.toString }}'
dependencies: highest
allowed-to-fail: false
variant: {{ variant.toString|raw }}
{% endfor %}
{% for variant in branch.variants|filter(v => v.package == 'symfony/symfony') %}
- php-version: '{{ branch.targetPhpVersion.toString }}'
dependencies: highest
allowed-to-fail: false
symfony-require: {{ variant.version }}
variant: {{ variant.toString|raw }}
{% endfor %}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: {% verbatim %}${{ matrix.php-version }}{% endverbatim %}
coverage: pcov
tools: composer:v2, flex
{% if branch.phpExtensions is not empty %}
extensions: {{ branch.phpExtensions|map(phpExtension => phpExtension.toString)|join(', ') }}
{% endif %}
- name: Add PHPUnit matcher
run: echo "::add-matcher::{% verbatim %}${{ runner.tool_cache }}{% endverbatim %}/phpunit.json"
- name: Install variant
if: matrix.variant != 'normal' && !startsWith(matrix.variant, 'symfony/symfony')
run: composer require {% verbatim %}${{ matrix.variant }}{% endverbatim %} --no-update
- name: Install Composer dependencies ({% verbatim %}${{ matrix.dependencies }}{% endverbatim %})
uses: ramsey/composer-install@v3
with:
dependency-versions: {% verbatim %}${{ matrix.dependencies }}{% endverbatim %}
- name: Run Tests with coverage
run: make coverage
- name: Send coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: build/logs/clover.xml