-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (41 loc) · 1.15 KB
/
main.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4' ]
fail-fast: false
name: Tests (PHP ${{ matrix.php }})
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: xdebug
extensions: pdo_sqlite
- name: Install Dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: "highest"
- name: Run Tests
env:
COLUMNS: 130
LINES: 30
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: Downloading Scrutinizer CI binary
run: wget https://scrutinizer-ci.com/ocular.phar
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Uploading code coverage to Scrutinizer CI
run: php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml