-
-
Notifications
You must be signed in to change notification settings - Fork 41
28 lines (28 loc) · 845 Bytes
/
test.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
name: UnitTests and CodeCoverage
on: [push]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Composer dependencies
run: composer install
- name: Run Testsuite
run: vendor/bin/phpunit
code-coverages:
runs-on: ubuntu-latest
needs: unit-tests
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Composer dependencies
run: composer install
- name: Run Testsuite
run: php -d xdebug.mode=coverage vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml