forked from psalm/psalm-plugin-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (116 loc) · 4.38 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
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
name: "Integrate"
on:
pull_request: ~
push:
branches:
- master
schedule:
- cron: "0 10 * * *"
jobs:
static-code-analysis:
name: "Static Code Analysis"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 7.3
- 7.4
- 8.0
dependencies:
- highest
- lowest
exclude:
- php-version: 7.3
dependencies: lowest
- php-version: 7.4
dependencies: lowest
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
- name: "Determine composer cache directory"
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
- name: "Install lowest dependencies from composer.json"
if: matrix.dependencies == 'lowest'
run: composer update --no-interaction --no-progress --prefer-lowest
- name: "Install highest dependencies from composer.json"
if: matrix.dependencies == 'highest'
run: composer install --no-interaction --no-progress
- name: "Cache cache directory for vimeo/psalm"
uses: actions/cache@v1
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
tests:
name: "Tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
symfony-version:
- 3
- 4
- 5
exclude:
- php-version: 7.1
symfony-version: 5
- php-version: 8.0
symfony-version: 3
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}
tools: flex
- name: "Determine composer cache directory"
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"
- name: "Cache dependencies installed with composer"
uses: actions/cache@v1
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.symfony-version }}-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.symfony-version }}-
- name: "Restrict symfony dependencies to the correct version"
run: composer config extra.symfony.require ${{ matrix.symfony-version }}.*
- name: "Update dependencies with restricted symfony version"
run: composer update --prefer-stable --no-interaction --no-progress
- 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 base acceptance tests with codeception"
run: vendor/bin/codecept run -v -g symfony-common
- name: "Run Symfony 3 acceptance tests with codeception"
if: matrix.symfony-version == '3'
run: vendor/bin/codecept run -v -g symfony-3
- name: "Run symfony 4 acceptance tests with codeception"
if: matrix.symfony-version == '4'
run: vendor/bin/codecept run -v -g symfony-4
- name: "Run Symfony 5 acceptance tests with codeception"
if: matrix.symfony-version == '5'
run: vendor/bin/codecept run -v -g symfony-5