-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (40 loc) · 1.57 KB
/
phpunit.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
name: Tests
on: [push]
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.4, 7.3]
laravel: [6, 7]
dependency-version: [lowest, stable]
include:
- laravel: 7
testbench: 5
- laravel: 6
testbench: 4
name: ${{ matrix.laravel }}.x on ${{ matrix.php }} (${{ matrix.dependency-version }} deps)
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
extensions: dom, libxml, mbstring
coverage: pcov
- name: Install dependencies
run: composer update --prefer-${{ matrix.dependency-version }} --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Set Laravel version
run: "composer require laravel/framework:^${{ matrix.laravel }}.0 orchestra/testbench:^${{ matrix.testbench }}.0 --update-with-all-dependencies --prefer-${{ matrix.dependency-version }} --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist"
- name: Execute tests
run: vendor/bin/phpunit --coverage-clover ${{ github.workspace }}/clover.xml
- name: Publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: echo "ok"
debug: true
coverageLocations:
"${{github.workspace}}/clover.xml:clover"