-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (39 loc) · 1.29 KB
/
Copy pathci.yml
File metadata and controls
50 lines (39 loc) · 1.29 KB
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
name: CI
on:
push:
jobs:
php-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.4, 8.0]
name: PHP${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json
coverage: xdebug
- name: Install dependencies
run: composer update --prefer-dist --no-suggest --no-interaction --no-scripts
- name: Check codestyle
run: vendor/bin/ecs check --config=dev/easy-coding-standard.yml --no-progress-bar .
- name: Execute unit tests
run: vendor/bin/phpunit --testdox --colors=always --coverage-text=report/coverage.txt
- name: Archive code coverage results
if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: report/coverage.txt
- name: Report coverage in PR
if: ${{ github.event_name == 'pull_request' }}
uses: slavcodev/coverage-monitor-action@1.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clover_file: "logs/clover.xml"
threshold_alert: 10
threshold_warning: 50