-
-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (33 loc) · 1.01 KB
/
Copy pathcode-coverage.yml
File metadata and controls
36 lines (33 loc) · 1.01 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
name: Code Coverage
on:
push:
# only trigger if theres a change in src/ directory
paths:
- '.github/workflows/code-coverage.yml'
- 'clover.xml'
pull_request:
paths:
- '.github/workflows/code-coverage.yml'
- 'clover.xml'
workflow_dispatch:
permissions:
contents: write
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Make code coverage badge
uses: timkrase/phpunit-coverage-badge@v1.2.1
with:
coverage_badge_path: coverage.svg
push_badge: false
- name: Commit badge
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add coverage.svg
git commit -am "coverage.svg badge updated" --no-verify
git push --no-verify
continue-on-error: true # do not fail if nothing changed