-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (68 loc) · 2.66 KB
/
Copy pathtests.yml
File metadata and controls
79 lines (68 loc) · 2.66 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: PHP ${{ matrix.php }} Redis ${{ matrix.redis }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '8.0'
- '8.1'
- '8.2'
redis:
- 5
- 6
- 7
services:
redis:
image: redis:${{ matrix.redis }}
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- 6379:6379
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP with Composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ (matrix.php == '8.1' && matrix.redis == '7') && 'xdebug' || 'none' }}
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: highest
- name: Run feature tests
run: vendor/bin/phpunit --testsuite feature --verbose
- name: Run unit tests
if: ${{ matrix.php != '8.1' || matrix.redis != '7' }}
run: vendor/bin/phpunit --testsuite unit --verbose --log-junit report.xml
- name: Run unit tests with coverage
if: ${{ matrix.php == '8.1' && matrix.redis == '7' }}
run: vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml --coverage-filter ./src --log-junit report.xml
- name: Upload codecov coverage
uses: codecov/codecov-action@v3
if: ${{ matrix.php == '8.1' && matrix.redis == '7' }}
with:
fail_ci_if_error: false
files: build/logs/clover.xml
verbose: true
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
path: "report.xml"
name: Test Report PHP ${{ matrix.php }} Redis ${{ matrix.redis }}
reporter: java-junit
list-suites: all
list-tests: all
max-annotations: 10
fail-on-error: 'false'