-
-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (46 loc) · 1.35 KB
/
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
45
46
47
48
49
50
51
52
53
54
name: Code Coverage
on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'
jobs:
code-coverage:
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-versions: [ '8.0' ]
operating-system: [ ubuntu-20.04 ]
steps:
- name: Setup PHP
# Commit hash for v2.17.0: https://github.com/shivammathur/setup-php/releases/tag/2.17.0
uses: shivammathur/setup-php@7854a0cae7fa7a5f3feac66d27bae2dc42d1067a
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
- name: Checkout session
uses: actions/checkout@v2
- name: Install PHPUnit
run: |
composer require phpunit/phpunit:^9 --update-with-dependencies
- name: Generate Coverage Report
run: |
cd _tests
mkdir -p build/logs
../vendor/bin/phpunit
- name: Upload coverage to Codecov
run: |
bash <(curl -s https://codecov.io/bash)