-
-
Notifications
You must be signed in to change notification settings - Fork 930
/
config.yml
280 lines (276 loc) · 7.83 KB
/
config.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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
version: 2.1
orbs:
changelog: ory/changelog@0.1.3
goreleaser: ory/goreleaser@0.1.13
slack: circleci/slack@3.4.2
sdk: ory/sdk@0.1.37
nancy: ory/nancy@0.0.12
docs: ory/docs@0.0.4
golangci: ory/golangci@0.0.4
jobs:
test:
docker:
-
image: circleci/golang:1.14
environment:
- GO111MODULE=on
- TEST_MAILHOG_SMTP=smtp://test:test@127.0.0.1:1025
- TEST_MAILHOG_API=http://127.0.0.1:8025
- TEST_SELFSERVICE_OIDC_HYDRA_ADMIN=http://127.0.0.1:4445
- TEST_SELFSERVICE_OIDC_HYDRA_PUBLIC=http://127.0.0.1:4444
- TEST_SELFSERVICE_OIDC_HYDRA_INTEGRATION_ADDR=http://127.0.0.1:4499
- TEST_DATABASE_POSTGRESQL=postgres://test:test@localhost:5432/postgres?sslmode=disable
- TEST_DATABASE_MYSQL=mysql://root:test@(localhost:3306)/mysql?parseTime=true&multiStatements=true
- TEST_DATABASE_COCKROACHDB=cockroach://root@localhost:26257/defaultdb?sslmode=disable
-
image: mailhog/mailhog:v1.0.0
command: MailHog -invite-jim -jim-linkspeed-affect=0.25 -jim-reject-auth=0.25 -jim-reject-recipient=0.25 -jim-reject-sender=0.25 -jim-disconnect=0.25 -jim-linkspeed-min=1250 -jim-linkspeed-max=12500
-
image: postgres:9.6
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
- POSTGRES_DB=postgres
-
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=test
-
image: cockroachdb/cockroach:v19.2.0
command: start --insecure
-
image: oryd/hydra:v1.4.10
environment:
- DSN=memory
- URLS_SELF_ISSUER=http://127.0.0.1:4444/
- URLS_LOGIN=http://127.0.0.1:4499/login
- URLS_CONSENT=http://127.0.0.1:4499/consent
command: serve all --dangerous-force-http
working_directory: /go/src/github.com/ory/kratos
steps:
- checkout
- setup_remote_docker
-
run: GO111MODULE=off go get github.com/mattn/goveralls github.com/ory/go-acc
-
restore_cache:
keys:
- go-v1-{{ checksum "go.sum" }}
-
run: go mod download
-
save_cache:
key: go-v1-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
-
run: timeout 15 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 4444
-
run: go-acc -o coverage.txt ./... -- -v -failfast -timeout=20m -tags sqlite
-
run: test -z "$CIRCLE_PR_NUMBER" && goveralls -service=circle-ci -coverprofile=coverage.txt -repotoken=$COVERALLS_REPO_TOKEN || echo "forks are not allowed to push to coveralls"
test-e2e:
parameters:
flavor:
type: string
docker:
- image: oryd/e2e-env:latest
environment:
- GO111MODULE=on
- TEST_DATABASE_MYSQL=mysql://root:test@(localhost:3306)/mysql?parseTime=true&multiStatements=true
- TEST_DATABASE_COCKROACHDB=cockroach://root@localhost:26257/defaultdb?sslmode=disable
- TEST_DATABASE_POSTGRESQL=postgres://test:test@localhost:5432/kratos?sslmode=disable
- image: postgres:9.6
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=test
- POSTGRES_DB=kratos
- image: cockroachdb/cockroach:v2.1.6
command: start --insecure
- image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=test
- image: oryd/mailslurper:latest-smtps
working_directory: /go/src/github.com/ory/kratos
steps:
- checkout
# core node_modules cache
- restore_cache:
keys:
- v1-deps-{{ checksum "package-lock.json" }}
- v1-deps
- run: npm ci
- save_cache:
key: v1-deps-{{ checksum "package-lock.json" }}
# cache NPM modules and the folder with the Cypress binary
paths:
- ~/.npm
- ~/.cache
# go modules cache
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run: go mod download
- save_cache:
key: go-mod-v1-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run: make deps
- run: ./test/e2e/run.sh << parameters.flavor >>
workflows:
tbr:
jobs:
- nancy/test
-
golangci/lint:
filters:
tags:
only: /.*/
- test-e2e:
name: test-e2e-sqlite
flavor: sqlite
requires:
- test
- nancy/test
- golangci/lint
filters:
tags:
only: /.*/
- test-e2e:
name: test-e2e-postgres
flavor: postgres
requires:
- test-e2e-postgres
filters:
tags:
only: /.*/
- test-e2e:
name: test-e2e-mysql
flavor: mysql
requires:
- test-e2e-mysql
filters:
tags:
only: /.*/
- test-e2e:
name: test-e2e-cockroach
flavor: cockroach
requires:
- test-e2e-cockroach
filters:
tags:
only: /.*/
-
test:
filters:
tags:
only: /.*/
- sdk/generate:
appname: Ory_Kratos
requires:
- test
- test-e2e-sqlite
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
filters:
tags:
only: /.*/
branches:
ignore: /master/
- docs/build:
requires:
- test
- test-e2e-sqlite
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
filters:
tags:
only: /.*/
branches:
only: master
- sdk/release:
requires:
- test
- test-e2e-sqlite
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
- sdk/generate
- goreleaser/release
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- changelog/generate:
requires:
- test
- test-e2e-sqlite
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
filters:
tags:
only: /.*/
branches:
only: master
-
goreleaser/test:
filters:
tags:
only: /.*/
-
goreleaser/release:
requires:
- goreleaser/test
- test
- test-e2e-sqlite
- test-e2e-postgres
- test-e2e-mysql
- test-e2e-cockroach
- golangci/lint
filters:
branches:
ignore: /.*/
tags:
only: /.*/
-
goreleaser/newsletter-draft:
chimp-list: f605a41b53
chimp-segment: 6479477
requires:
- goreleaser/release
filters:
tags:
only: /.*/
-
slack/approval-notification:
message: Pending approval
channel: release-automation
requires:
- goreleaser/newsletter-draft
filters:
tags:
only: /.*/
-
newsletter-approval:
type: approval
requires:
- goreleaser/newsletter-draft
filters:
tags:
only: /.*/
-
goreleaser/newsletter-send:
chimp-list: f605a41b53
requires:
- newsletter-approval
filters:
tags:
only: /.*/