-
-
Notifications
You must be signed in to change notification settings - Fork 277
102 lines (94 loc) · 2.44 KB
/
ci.yml
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
name: Continuous integration
on:
pull_request:
paths-ignore:
- 'LICENSE'
- '.*'
- '*.md'
- '*.xml'
- '*.yml*'
- '*.neon'
push:
branches:
- main
- develop
- 2.x
paths-ignore:
- 'LICENSE'
- '.*'
- '*.md'
- '*.xml'
- '*.yml*'
- '*.neon'
jobs:
static-analysis:
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: ['8.2']
command: ['cs', 'stan', 'swagger:validate']
steps:
- uses: actions/checkout@v4
- uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ matrix.command }}
- run: composer ${{ matrix.command }}
unit-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: unit
cli-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: cli
api-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: api
db-tests:
strategy:
matrix:
platform: ['sqlite:ci', 'mysql', 'maria', 'postgres', 'ms']
uses: './.github/workflows/ci-db-tests.yml'
with:
platform: ${{ matrix.platform }}
upload-coverage:
needs:
- unit-tests
- api-tests
- cli-tests
- db-tests
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: ['8.2']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use PHP
uses: './.github/actions/ci-setup'
with:
php-version: ${{ matrix.php-version }}
extensions-cache-key: tests-extensions-${{ matrix.php-version }}
- uses: actions/download-artifact@v4
with:
path: build
- run: mv build/coverage-unit/coverage-unit.cov build/coverage-unit.cov
- run: mv build/coverage-db/coverage-db.cov build/coverage-db.cov
- run: mv build/coverage-api/coverage-api.cov build/coverage-api.cov
- run: mv build/coverage-cli/coverage-cli.cov build/coverage-cli.cov
- run: vendor/bin/phpcov merge build --clover build/clover.xml
- name: Publish coverage
uses: codecov/codecov-action@v4
with:
file: ./build/clover.xml
delete-artifacts:
needs:
- upload-coverage
runs-on: ubuntu-22.04
steps:
- uses: geekyeggo/delete-artifact@v2
with:
name: |
coverage-*