-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 2.49 KB
/
Copy pathci.yml
File metadata and controls
78 lines (65 loc) · 2.49 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.4', '8.5']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@728c6c6b8cf02c2e48117716a91ee48313958a19 # v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
tools: composer:v2
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction
- name: Audit dependencies
run: composer audit
- name: Format check
run: composer format:check
- name: Static analysis (self)
run: composer phpstan
- name: Tests with coverage
run: composer test:coverage
- name: Coverage threshold gate
run: composer coverage:check
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: clover-php-${{ matrix.php }}
path: build/logs/clover.xml
retention-days: 14
if-no-files-found: ignore
- name: Mutation testing
run: composer mutation:ci
- name: Upload mutation report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: infection-php-${{ matrix.php }}
path: build/logs/infection.*
retention-days: 14
if-no-files-found: ignore
# Aggregate tracked by the town-crier trial (TC-0069); intended as the single
# required check (the matrix legs stop being individually required). A `needs`
# on a matrix job waits for every leg.
ci-passed:
name: ci-passed
runs-on: ubuntu-latest
needs: [check]
if: always()
steps:
- name: Verify all matrix legs passed
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: |
echo "One or more CI lanes did not pass."
exit 1