-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (56 loc) · 1.78 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
name: Continious Integration
on: push
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1']
prefer-lowest: ['', '--prefer-lowest']
steps:
- uses: actions/checkout@v1
- uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
coverage: pcov
- name: Install dependencies
run: composer update -n --prefer-dist ${{ matrix.prefer-lowest }}
- name: Run unit tests
run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --whitelist src/
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: matrix.php-versions == '8.0'
infection:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: vendor
key: dependencies-${{ matrix.php-versions }}-${{ hashFiles('composer.json') }}
- uses: shivammathur/setup-php@master
with:
php-version: '8.0'
coverage: pcov
- name: Install dependencies
run: composer install -n --prefer-dist
- name: Run mutation tests with GitHub logger
run: |
git fetch --depth=1 origin $GITHUB_BASE_REF
vendor/bin/infection --show-mutations --debug -vvv --logger-github --git-diff-filter=A
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
with:
path: vendor
key: dependencies-${{ matrix.php-versions }}-${{ hashFiles('composer.json') }}
- uses: shivammathur/setup-php@master
with:
php-version: '8.0'
- name: Install dependencies
run: composer install -n --prefer-dist
- name: Run static analysis
run: vendor/bin/phpstan analyse