-
Notifications
You must be signed in to change notification settings - Fork 31
47 lines (40 loc) · 1.26 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
name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v2
- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
# @link https://github.com/php-actions/composer
- uses: php-actions/composer@v5
with:
php_version: 7.4
php_extensions: mbstring iconv json xdebug
version: 1
# @link https://github.com/php-actions/example-phpunit
- name: "phpunit"
uses: php-actions/phpunit@v2
with:
php_version: 7.4
php_extensions: mbstring iconv json xdebug
bootstrap: test/bootstrap.php
configuration: phpunit.xml
args: --coverage-clover clover.xml
env:
XDEBUG_MODE: coverage
- name: "Send code coverage report to Codecov.io"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
run: "bash <(curl -s https://codecov.io/bash) || true"