forked from marc-mabe/php-enum-phpstan
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1003 Bytes
/
tests-code-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
name: Tests with code coverage
on:
pull_request:
push:
branches:
- master
jobs:
tests:
name: "Tests"
runs-on: "ubuntu-latest"
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
php-version:
- "7.4"
- "8.0"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
extensions: mbstring
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
- name: "Tests"
run: |
php -d 'zend.assertions=1' -d 'pcov.enabled=1' -d 'pcov.directory=src' vendor/bin/phpunit --coverage-clover=.clover.xml
- name: "Upload Codecov Report"
uses: "codecov/codecov-action@v1"
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: .clover.xml