-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.49 KB
/
php.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
55
56
57
58
59
60
61
name: build
on:
push:
branches: [ stable, development ]
pull_request:
branches: [ stable, development ]
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
max-parallel: 2
fail-fast: false
matrix:
php: [7.4, 8.0]
experimental: [false]
steps:
- uses: actions/checkout@v2
- name: Setup PHP Action
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies with Composer
uses: ramsey/composer-install@v1
- name: Run unit tests
run: php vendor/bin/codecept run unit
- name: Run Codecept coverage
run: php vendor/bin/codecept run --coverage --coverage-xml --coverage-phpunit
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./tests/_output
files: ./tests/_output/coverage.xml
flags: unittests
verbose: true
fail_ci_if_error: true