generated from glhd/laravel-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.35 KB
/
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
39
40
41
42
43
44
45
46
47
48
name: Code Coverage
on:
push:
branches:
- main
jobs:
coverage:
runs-on: ubuntu-latest
name: Publish code coverage
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, iconv
coverage: pcov
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
vendor
${{ steps.composer-cache-files-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
env:
COMPOSER_DISCARD_CHANGES: true
run: composer require --no-progress --no-interaction --prefer-dist --update-with-all-dependencies "laravel/framework:10.*" "orchestra/testbench:8.*"
- name: Run and publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: vendor/bin/phpunit --coverage-clover ${{ github.workspace }}/clover.xml
debug: true
coverageLocations:
"${{github.workspace}}/clover.xml:clover"