-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (60 loc) · 1.78 KB
/
Copy pathci-checks.yml
File metadata and controls
62 lines (60 loc) · 1.78 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
51
52
53
54
55
56
57
58
59
60
61
62
name: CI-CHECKS
on:
pull_request:
branches:
- master
jobs:
run-phpcs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
uses: php-actions/composer@v6
- name: Run PHPCodesniffer
run: ./vendor/bin/phpcs -p -s --standard=phpcs.xml src tests
run-php-stan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
uses: php-actions/composer@v6
- name: Run PHPStan
run: vendor/bin/phpstan analyse -c phpstan.neon.dist
run-php-unit-tests:
needs: [ run-phpcs, run-php-stan ]
if: always()
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
uses: php-actions/composer@v6
- name: Execute tests
run: vendor/bin/phpunit -c phpunit.xml --colors=always --verbose --testdox
run-assemble-php-unit-coverage:
needs: [ run-php-unit-tests ]
if: always()
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4.0'
coverage: xdebug
- name: Install dependencies
uses: php-actions/composer@v6
- name: Execute tests
run: vendor/bin/phpunit -c phpunit.xml --coverage-text --colors=always --verbose --testdox
env:
XDEBUG_MODE: coverage
- name: Generate test coverage badge
uses: timkrase/phpunit-coverage-badge@v1.2.0
with:
report: ./clover.xml
coverage_badge_path: 'badge.svg'
push_badge: true
repo_token: ${{ secrets.GITHUB_TOKEN }}