Skip to content

Commit 10cdac3

Browse files
committed
Setup Codacy test coverage
1 parent 8a11ab7 commit 10cdac3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/run-tests.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ on: [ push, pull_request ]
44

55
jobs:
66
test:
7-
runs-on: ubuntu-latest
7+
runs-on: ${{ matrix.os }}
88
strategy:
99
fail-fast: true
1010
matrix:
11+
os: [ ubuntu-latest ]
1112
php: [ 7.1, 7.2, 7.3, 7.4, 8.0 ]
1213
laravel: [ 5.6.*, 5.7.*, 5.8.*, 6.*, 7.*, 8.* ]
1314
dependency-version: [ prefer-stable ]
@@ -57,12 +58,19 @@ jobs:
5758
with:
5859
php-version: ${{ matrix.php }}
5960
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
60-
coverage: none
61+
coverage: xdebug
6162

6263
- name: Install dependencies
6364
run: |
6465
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
6566
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
6667
6768
- name: Execute tests
68-
run: vendor/bin/phpunit
69+
run: vendor/bin/phpunit --coverage-clover=coverage.xml
70+
71+
- if: github.event_name == 'push'
72+
name: Run Codacy Coverage Reporter
73+
uses: codacy/codacy-coverage-reporter-action@master
74+
with:
75+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
76+
coverage-reports: coverage.xml

0 commit comments

Comments
 (0)