-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (46 loc) · 1.66 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
name: ci
on:
pull_request:
push:
jobs:
ci:
strategy:
matrix:
php-versions: [ '8.0', '8.1' ]
composer-versions: ['update --prefer-dist', 'update --prefer-lowest']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Validate composer
run: composer validate --no-check-publish
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Setup composer versions
run: composer ${{ matrix.composer-versions }}
- name: Run phpcsfixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff
- name: Phpstan
run: vendor/bin/phpstan
- name: Run tests
run: vendor/bin/phpunit --coverage-text --coverage-clover=.build/clover.xml --coverage-xml=.build/coverage --log-junit=.build/coverage/junit.xml
- name: Require 100% coverage
run: vendor/bin/coverage-check .build/clover.xml 100
- name: Run infection
run: vendor/bin/infection --skip-initial-tests --threads=8 --coverage=.build/coverage
linkcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
- name: Install markdown checker
run: npm install markdown-link-check
- name: Check links
run: node_modules/.bin/markdown-link-check README.md