-
Notifications
You must be signed in to change notification settings - Fork 81
181 lines (160 loc) · 5.01 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: CI Build
on:
workflow_dispatch:
push:
branches:
- master
- v4
jobs:
staticanalyses:
strategy:
fail-fast: false
matrix:
rcube-version: ['release-1.4', 'release-1.5', 'release-1.6', 'master']
runs-on: ubuntu-20.04
steps:
- name: Checkout rcmcarddav
uses: actions/checkout@v4
- name: Set up CI environment
uses: ./.github/actions/setup
with:
rcube-version: ${{ matrix.rcube-version }}
- name: Check code style compliance with PSR12
run: make stylecheck
- name: Check code compatibility with minimum supported PHP version
run: make phpcompatcheck
- name: Run psalm static analysis
run: make psalmanalysis
- name: Check test datasets have a description
run: make checktestspecs
unittests:
strategy:
fail-fast: false
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2']
runs-on: ubuntu-20.04
env:
XDEBUG_MODE: coverage
steps:
- name: Checkout rcmcarddav
uses: actions/checkout@v4
- name: Set up CI environment
uses: ./.github/actions/setup
with:
php-version: ${{ matrix.php-version }}
- name: Run unit tests
run: make unittests
- name: Upload unit test coverage reports to codecov.io
uses: codecov/codecov-action@v4
with:
files: testreports/unit/clover.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
name: RCMCardDAV unit test coverage
dbinterop-sqlite3:
runs-on: ubuntu-20.04
env:
XDEBUG_MODE: coverage
steps:
- name: Checkout rcmcarddav
uses: actions/checkout@v4
- name: Set up CI environment
uses: ./.github/actions/setup
- name: Database interoperability tests for SQLite3
run: make tests-sqlite3
- name: Upload DB interoperability test coverage reports to codecov.io
uses: codecov/codecov-action@v4
with:
files: testreports/dbinterop-sqlite3/clover.xml
flags: dbinterop-sqlite3
token: ${{ secrets.CODECOV_TOKEN }}
name: RCMCardDAV SQLite3 database interoperability test coverage
dbinterop-mysql:
strategy:
fail-fast: false
matrix:
mysql-version:
- 'mysql:5.6'
- 'mysql:5.7'
- 'mysql:8'
- 'mariadb:10.2'
- 'mariadb:10.3'
- 'mariadb:10.4'
- 'mariadb:10.5'
- 'mariadb:10.6'
- 'mariadb:10.7'
- 'mariadb:10.8'
- 'mariadb:10.9'
runs-on: ubuntu-20.04
env:
XDEBUG_MODE: coverage
MYSQL_PASSWORD: root
MYSQL_CMD_PREFIX: "docker exec -i mysql"
services:
mysql:
image: ${{ matrix.mysql-version }}
env:
MYSQL_ROOT_PASSWORD: root
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--name mysql
ports:
- 3306:3306
steps:
- name: Checkout rcmcarddav
uses: actions/checkout@v4
- name: Set up CI environment
uses: ./.github/actions/setup
- name: Set MySQL settings
if: ${{ matrix.mysql-version == 'mysql:5.6' }}
run: cat .github/configs/mysqlsettings.sql | docker exec -i mysql mysql -uroot -proot
- name: Database interoperability tests for MySQL
run: make tests-mysql
- name: Upload DB interoperability test coverage reports to codecov.io
uses: codecov/codecov-action@v4
with:
files: testreports/dbinterop-mysql/clover.xml
flags: dbinterop-mysql
token: ${{ secrets.CODECOV_TOKEN }}
name: RCMCardDAV MySQL database interoperability test coverage
dbinterop-postgres:
strategy:
fail-fast: false
matrix:
postgres-version: ['9', '10', '11', '12', '13', '14', '15']
runs-on: ubuntu-20.04
env:
XDEBUG_MODE: coverage
PGHOST: localhost
PGUSER: postgres
POSTGRES_CMD_PREFIX: "docker exec -i -e PGUSER=postgres postgres"
services:
postgres:
image: postgres:${{ matrix.postgres-version }}-alpine
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--name postgres
ports:
- 5432:5432
steps:
- name: Checkout rcmcarddav
uses: actions/checkout@v4
- name: Set up CI environment
uses: ./.github/actions/setup
- name: Database interoperability tests for Postgres
run: make tests-postgres
- name: Upload DB interoperability test coverage reports to codecov.io
uses: codecov/codecov-action@v4
with:
files: testreports/dbinterop-postgres/clover.xml
flags: dbinterop-postgres
token: ${{ secrets.CODECOV_TOKEN }}
name: RCMCardDAV PostgreSQL database interoperability test coverage