-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (27 loc) · 1.03 KB
/
test-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
on: ["push", "pull_request"]
name: Test coverage
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
# Fetch 10 commits or Scrutinizer will throw ("Failed to retrieve commit parents. If you use a shallow git checkout, please checkout at least a depth of one."), see: RepositoryIntrospector at scrutinizer-ci/ocular GitHub repository
# 10 commits is an arbitrary value that is more than 1 commit
fetch-depth: 10
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "8.3"
ini-values: memory_limit=-1
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
- name: "Tests"
run: "vendor/bin/phpunit --coverage-clover=coverage.clover"
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: "--format=php-clover coverage.clover"