This repository was archived by the owner on Aug 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.38 KB
/
unit-tests.yml
File metadata and controls
48 lines (40 loc) · 1.38 KB
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
name: "unit tests"
on: ["pull_request", "push"]
jobs:
unit-tests:
name: "unit tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.0"
steps:
- name: "checkout"
uses: "actions/checkout@v2"
- name: "installing PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2, cs2pr
coverage: pcov
ini-values: memory_limit=-1
- name: "get composer cache directory"
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: "cache dependencies"
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: "install dependencies"
run: composer install --prefer-dist
- name: "running unit tests"
run: vendor/bin/simple-phpunit --coverage-clover build/logs/phpunit/clover.xml --log-junit build/logs/phpunit/junit.xml
- name: "upload coverage results to Codecov"
uses: codecov/codecov-action@v1
with:
name: "phpunit-php${{ matrix.php-version }}"
flags: phpunit
fail_ci_if_error: true
continue-on-error: true