-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (89 loc) · 2.65 KB
/
ci.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
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "CI"
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
phpcs:
name: "PHP CS"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: false
steps:
- name: Checkout
uses: "actions/checkout@v3"
- name: Setup PHP
uses: "shivammathur/setup-php@v2"
with:
coverage: none
php-version: 8.3
extensions: curl
tools: composer, cs2pr
- name: Install dependencies
run: "composer install --no-progress --prefer-dist --classmap-authoritative --ansi"
- name: Run PHP_CodeSniffer
run: "vendor/bin/phpcs -nq --report=checkstyle | cs2pr"
phpstan:
name: "PHPStan"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: false
steps:
- name: Checkout
uses: "actions/checkout@v3"
- name: Setup PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: 8.3
tools: composer
extensions: curl
coverage: none
ini-values: memory_limit=-1
- name: Install dependencies
run: composer install --no-progress --prefer-dist --classmap-authoritative --ansi
- name: Setup Kernel Cache
run: bin/console cache:warm --env=test
- name: Run PHPStan analysis
run: |
./vendor/bin/phpstan --version
./vendor/bin/phpstan analyse -c phpstan.dist.neon --no-interaction --no-progress --ansi
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: false
steps:
- name: Checkout
uses: "actions/checkout@v3"
- name: Setup PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: 8.3
extensions: curl
ini-values: memory_limit=-1
tools: composer
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer install --no-progress --prefer-dist --classmap-authoritative --ansi
- name: Install PHPUnit
run: vendor/bin/simple-phpunit --version
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install
- name: Build bundle
uses: borales/actions-yarn@v4
with:
cmd: build
- name: Run PHPUnit tests
run: vendor/bin/simple-phpunit