Repository navigation
123 lines (101 loc) · 3.6 KB
/
Copy pathphpunit.yml
File metadata and controls
123 lines (101 loc) · 3.6 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: PHPunit
on:
push:
branches:
- master
pull_request: null
permissions:
contents: read
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.4', '8.5' ]
experimental: [ false ]
include:
- php: '8.6'
experimental: true
continue-on-error: ${{ matrix.experimental }}
name: PHPunit PHP ${{ matrix.php }}
services:
# RedisStorage and the Redis clients are tested against a real Redis
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 10
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
php-version: ${{ matrix.php }}
coverage: xdebug
extensions: redis
- name: Composer update
run: composer update --no-progress --no-interaction ${{ matrix.experimental && '--ignore-platform-req=php+' || '' }}
- name: PHPunit
run: vendor/bin/phpunit --coverage-text
lowest:
runs-on: ubuntu-latest
name: PHPunit PHP 8.4 lowest dependencies
services:
# RedisStorage and the Redis clients are tested against a real Redis
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 10
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
php-version: '8.4'
coverage: xdebug
extensions: redis
- name: Composer update
run: composer update --prefer-lowest --prefer-stable --no-progress --no-interaction
- name: PHPunit
run: vendor/bin/phpunit --no-coverage
env:
# CORS tests read sent headers via xdebug_get_headers()
XDEBUG_MODE: develop
infection:
runs-on: ubuntu-latest
name: Infection
env:
# keep Xdebug in the mutant runs, the CORS header tests read xdebug_get_headers()
INFECTION_ALLOW_XDEBUG: '1'
services:
# RedisStorage and the Redis clients are tested against a real Redis
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 10
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0
with:
php-version: '8.4'
coverage: xdebug
extensions: redis
- name: Composer update
run: composer update --no-progress --no-interaction
- name: Infection on changed lines
if: github.event_name == 'pull_request'
run: |
git fetch --depth=1 origin ${{ github.base_ref }}
vendor/bin/infection --threads=max --git-diff-lines --git-diff-base=origin/${{ github.base_ref }} --min-msi=100 --min-covered-msi=100 --ignore-msi-with-no-mutations --show-mutations
- name: Infection
if: github.event_name == 'push'
run: vendor/bin/infection --threads=max --show-mutations