-
-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (23 loc) · 776 Bytes
/
Copy pathcoverage.yml
File metadata and controls
29 lines (23 loc) · 776 Bytes
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
name: coverage
on:
push:
branches:
- main
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Dependencies
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
XDEBUG_MODE: coverage
run: php -dpcov.enabled=1 vendor/bin/phpunit --testdox --coverage-clover clover.xml
- name: Upload coverage to Codecov.io
shell: bash
run: bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} -f ${GITHUB_WORKSPACE}/clover.xml -C ${GITHUB_SHA}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}