forked from liip/LiipFunctionalTestBundle
-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (76 loc) · 2.13 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
name: CI
on:
pull_request: null
push:
branches:
- 1.x
jobs:
Tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '8.3'
- '8.2'
- '8.1'
- '8.0'
- '7.4'
dependencies: ['highest']
include:
- description: 'Symfony 5.4'
php: '8.1'
symfony_require: '^5.4'
- description: 'Symfony 4.4'
php: '7.3'
symfony_require: '^4.4'
- description: '(prefer lowest)'
php: '7.4'
symfony_require: '^4.4'
dependencies: 'lowest'
deprecations: 'disabled'
name: PHP ${{ matrix.php }} ${{ matrix.description }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Restrict Symfony version
run: composer require "symfony/symfony:${{ matrix.symfony_require }}" --no-update
if: matrix.symfony_require
- name: Install dependencies
uses: "ramsey/composer-install@v1"
with:
dependency-versions: ${{ matrix.dependencies }}
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml
env:
SYMFONY_DEPRECATIONS_HELPER: ${{ matrix.deprecations }}
- uses: codecov/codecov-action@v3
with:
file: './coverage.xml'
fail_ci_if_error: true
StaticAnalysis:
name: ${{ matrix.description }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- description: Validate composer.json
script: composer validate
- description: Code style
script: composer cs-check
- description: PHPStan
script: vendor/bin/phpstan analyze
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Install dependencies
uses: "ramsey/composer-install@v1"
- run: ${{ matrix.script }}