-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1022 Bytes
/
coverage.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
name: Coverage
on:
push:
branches:
- master
jobs:
coverage:
name: "Generate code coverage"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Build package
run: composer install --no-interaction --no-progress
- name: PHPUnit
run: ./vendor/bin/phpunit tests --coverage-clover clover.xml
- name: Generate Badge
uses: timkrase/phpunit-coverage-badge@v1.2.1
with:
coverage_badge_path: output/coverage.svg
push_badge: false
- name: Push Badge
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'