-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (36 loc) · 1.33 KB
/
tests.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
name: Run tests
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4']
phpunit-versions: ['latest']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, intl, ast
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run phpunit
run: php vendor/bin/phpunit --stop-on-failure --testsuite unit-tests --coverage-clover clover.xml
- name: Run mess detector
run: php vendor/bin/phpmd src/ ansi phpmd.xml
- name: Run code sniffer
run: php vendor/bin/phpcs src/ tests/ --colors -p
- name: Send test coverage to codecov.io
uses: codecov/codecov-action@v2.1.0
with:
files: clover.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)