-
Notifications
You must be signed in to change notification settings - Fork 32
54 lines (42 loc) · 1.26 KB
/
continuous-integration.yaml
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: Continuous integration
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ develop ]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
coverage: [ false ]
include:
- php-version: '8.4'
coverage: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suite
if: ${{ !matrix.coverage }}
run: vendor/bin/phpunit
- name: Run test suite with code coverage
if: ${{ matrix.coverage }}
run: php -dxdebug.mode=coverage vendor/bin/phpunit --coverage-clover coverage.xml
- name: Push coverage report
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v2