-
Notifications
You must be signed in to change notification settings - Fork 1
107 lines (84 loc) · 2.99 KB
/
continuous-integration.yml
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
name: "Continuous Integration"
on: [ push, pull_request ]
jobs:
code-style:
name: Code style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
tools: composer:v2
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Run php-cs-fixer
run: PHP_CS_FIXER_IGNORE_ENV=1 ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run --using-cache=no --verbose
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
tools: composer:v2
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Run vimeo/psalm
run: rm -rf ~/.cache/psalm/ && ./vendor/bin/psalm --config=psalm.xml --shepherd
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none
tools: composer:v2
- name: Install dependencies with composer
run: composer update --no-ansi --no-interaction --no-progress
- name: Run phpstan/phpstan
run: ./vendor/bin/phpstan analyse src --level 9
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
env:
PHP_EXTENSIONS: dom, json, mbstring, curl, tokenizer
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Override PHP ini values for JIT compiler
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=32M" >> $GITHUB_ENV
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}
tools: composer:v2
- name: Start Redis
uses: supercharge/redis-github-action@1.1.0
with:
redis-version: 6
- name: Install dependencies
run: composer update --no-ansi --no-interaction --no-progress
- name: Run tests with phpunit
run: XDEBUG_MODE=coverage php ./vendor/bin/phpunit --configuration ./phpunit.xml --debug --coverage-clover=coverage.xml
- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
files: ./coverage.xml