Repository navigation
58 lines (49 loc) · 1.52 KB
/
Copy pathphpunit.yml
File metadata and controls
58 lines (49 loc) · 1.52 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
# https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions
name: phpunit
on:
pull_request: {}
release: {}
push:
branches: [ master ]
jobs:
tests:
name: unit tests
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ 8.1, 8.2, 8.3, 8.4 ]
# permissions:
# contents: read
# pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: php-actions/composer@v6
- name: phpunit tests ${{ matrix.php-versions }}
uses: php-actions/phpunit@v4
with:
bootstrap: vendor/autoload.php
configuration: test/phpunit.xml
php_extensions: pcov
php_version: ${{ matrix.php-versions }}
version: 10.5
#vendored_phpunit_path: vendor/bin/phpunit
- name: coverage monitor
uses: slavcodev/coverage-monitor-action@1.10.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
coverage_path: test/clover.xml
comment_footer: false
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # require for private repo
files: test/clover.xml
name: github-ci
verbose: true
# - name: phpunit-coverage-badge
# uses: timkrase/phpunit-coverage-badge@v1.2.0
# with:
# report: test/clover.xml
# coverage_badge_path: test/coverage.svg
# push_badge: true
# repo_token: ${{ secrets.GITHUB_TOKEN }}