-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (53 loc) · 1.56 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
name: CI
on:
push:
workflow_dispatch:
jobs:
test-suite:
name: PHPStan, PHPcs & Testsuite
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: wca
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
steps:
# https://github.com/marketplace/actions/setup-php-action
- name: Setup PHP 8.2 with Xdebug 3.x
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: xdebug
extensions: intl
# https://github.com/marketplace/actions/checkout
- name: Checkout code
uses: actions/checkout@v3
with:
sparse-checkout: |
bin
config
public
src
tests
.env.github-actions
.php-cs-fixer.dist.php
composer.json
composer.lock
phpstan.neon
phpstan-baseline.neon
phpunit.xml.dist
- name: Copy .env file
run: cp .env.github-actions .env && cp .env.github-actions .env.test
- name: Wait for services to boot
run: sleep 10
- name: Install dependencies
run: composer install --prefer-dist
- name: Run PHPStan
run: vendor/bin/phpstan analyse
- name: Run PHPcs fixer dry-run
run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --config=.php-cs-fixer.dist.php
- name: Run test suite
run: vendor/bin/phpunit --fail-on-incomplete --log-junit junit.xml --coverage-clover clover.xml