-
Notifications
You must be signed in to change notification settings - Fork 11
110 lines (105 loc) · 2.75 KB
/
continuous-integration.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
name: "Continuous Integration"
on:
pull_request:
push:
branches:
tags:
jobs:
matrix:
name: Generate job matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Gather CI configuration
id: matrix
uses: laminas/laminas-ci-matrix-action@v1
qa-mysql:
name: QA Checks [MySQL]
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: true
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
env:
DB_VENDOR: "mysql"
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_USER: "gha"
MYSQL_PASSWORD: "password"
MYSQL_DATABASE: "snapshot_tests"
options: >-
--network-alias database
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
ports:
- 3306:3306
qa-postgres:
name: QA Checks [Postgres]
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: true
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
env:
DB_VENDOR: "postgres"
services:
postgres:
image: postgres:10
env:
POSTGRES_USER: "gha"
POSTGRES_PASSWORD: "password"
POSTGRES_DB: "snapshot_tests"
options: >-
--network-alias database
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 3
ports:
- 5432:5432
qa-mariadb:
name: QA Checks [MariaDB]
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
strategy:
fail-fast: true
matrix: ${{ fromJSON(needs.matrix.outputs.matrix) }}
steps:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
env:
DB_VENDOR: "mariadb"
services:
postgres:
image: mariadb:10.3
env:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_USER: "gha"
MYSQL_PASSWORD: "password"
MYSQL_DATABASE: "snapshot_tests"
options: >-
--network-alias database
--health-cmd="mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 3
ports:
- 3306:3306