-
Notifications
You must be signed in to change notification settings - Fork 53
109 lines (86 loc) · 2.87 KB
/
integrate.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
name: "Integrate"
on:
pull_request: ~
push:
branches:
- master
schedule:
- cron: "0 10 * * 6"
jobs:
static-code-analysis:
name: "Static Code Analysis (PHP: ${{matrix.php-version}}, deps: ${{matrix.dependencies}})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 8.1
- 8.2
- 8.3
- 8.4
dependencies:
- highest
- lowest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}
- name: "Cache cache directory for vimeo/psalm"
uses: actions/cache@v4
with:
path: .build/psalm
key: php-${{ matrix.php-version }}-psalm-${{ github.sha }}
restore-keys: php-${{ matrix.php-version }}-psalm-
- name: "Run vimeo/psalm"
run: vendor/bin/psalm --find-dead-code --find-unused-psalm-suppress --shepherd --show-info=false --stats --output-format=github --php-version=${{ matrix.php-version }}
if: matrix.php-version != '8.0'
- name: "Run vimeo/psalm"
run: vendor/bin/psalm --find-dead-code --find-unused-psalm-suppress --shepherd --show-info=false --stats --output-format=github --php-version=8.0
if: matrix.php-version == '8.0'
tests:
name: "Tests (PHP: ${{matrix.php-version}}, Symfony: ${{matrix.symfony-version}})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 8.1
- 8.2
- 8.3
- 8.4
symfony-version:
- 6
- 7.0
- 7.1
exclude:
- php-version: 8.1
symfony-version: 7.0
- php-version: 8.1
symfony-version: 7.1
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: flex
- name: "Restrict symfony dependencies to the correct version"
run: composer config extra.symfony.require ${{ matrix.symfony-version }}.*
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
- name: "Run unit tests with phpunit"
run: vendor/bin/phpunit --configuration=phpunit.xml
- name: "Build acceptance tests with codeception"
run: vendor/bin/codecept build
- name: "Run acceptance tests with codeception"
run: vendor/bin/codecept run -v -g symfony-common -g symfony-${{ matrix.symfony-version }}