-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (157 loc) · 4.47 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
name: basic-ci
on:
pull_request:
jobs:
linux-build-libs-1:
runs-on: ubuntu-latest
container: swift:5.8-focal
steps:
- name: checkout
uses: actions/checkout@v3
- name: build-duet
run: cd duet && swift build
- name: build-pairql
run: cd pairql && swift build
- name: build-pairql-macapp
run: cd pairql-macapp && swift build
linux-build-libs-2:
runs-on: ubuntu-latest
container: swift:5.8-focal
steps:
- name: checkout
uses: actions/checkout@v3
- name: build-gertie
run: cd gertie && swift build
- name: build-ts-interop
run: cd ts-interop && swift build
- name: build-x-expect
run: cd x-expect && swift build
- name: build-x-http
run: cd x-http && swift build
- name: build-x-kit
run: cd x-kit && swift build
- name: build-x-postmark
run: cd x-postmark && swift build
- name: build-x-sendgrid
run: cd x-sendgrid && swift build
- name: build-x-slack
run: cd x-slack && swift build
- name: build-x-stripe
run: cd x-stripe && swift build
linux-lib-test-libs-1:
runs-on: ubuntu-latest
container: swift:5.8-focal
steps:
- name: checkout
uses: actions/checkout@v3
- name: test-duet
run: cd duet && swift test
- name: test-pairql
run: cd pairql && swift test
linux-lib-test-libs-2:
runs-on: ubuntu-latest
container: swift:5.8-focal
steps:
- name: checkout
uses: actions/checkout@v3
- name: test-pairql-macapp
run: cd pairql-macapp && swift test
- name: test-ts-interop
run: cd ts-interop && swift test
- name: test-gertie
run: cd gertie && swift test
- name: test-x-http
run: cd x-http && swift test
- name: test-x-kit
run: cd x-kit && swift test
- name: test-x-slack
run: cd x-slack && swift test
linux-api-build:
runs-on: ubuntu-latest
container: swift:5.8-focal
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: api/.build
key: api-${{ hashFiles('api/Package.resolved') }}
restore-keys: api-
- name: build-api
run: cd api && swift build
linux-api-test:
runs-on: ubuntu-latest
container: swift:5.8-focal
env:
DATABASE_HOST: postgres
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: vapor_username
POSTGRES_PASSWORD: vapor_password
POSTGRES_DB: vapor_database
steps:
- name: checkout
uses: actions/checkout@v3
# only restore, job:linux-api-build will save, to save execution time
- uses: actions/cache/restore@v3
with:
path: api/.build
key: api-${{ hashFiles('api/Package.resolved') }}
restore-keys: api-
- name: test-api
run: cd api && swift test
files-changed:
runs-on: ubuntu-latest
outputs:
macapplib: ${{ steps.changes.outputs.macapplib }}
steps:
- name: checkout
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
macapplib:
- macapp/App/**
macapp-lib:
needs: files-changed
if: needs.files-changed.outputs.macapplib == 'true'
runs-on: macos-13
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 14.3.1
- uses: actions/cache@v3
with:
path: macapp/App/.build
key: macapp-spm--${{ hashFiles('macapp/App/Package.resolved') }}
restore-keys: macapp-spm--
- name: build
run: cd macapp/App && swift build
- name: test
run: cd macapp/App && swift test
# env
env:
DATABASE_NAME: vapor_database
DATABASE_USERNAME: vapor_username
DATABASE_PASSWORD: vapor_password
TEST_DATABASE_NAME: vapor_database
CLOUD_STORAGE_KEY: not-real
CLOUD_STORAGE_SECRET: not-real
CLOUD_STORAGE_ENDPOINT: not-real
CLOUD_STORAGE_BUCKET: not-real
CLOUD_STORAGE_BUCKET_URL: /not-real
TWILIO_ACCOUNT_SID: not-real
TWILIO_AUTH_TOKEN: not-real
TWILIO_FROM_PHONE: not-real
DASHBOARD_URL: /dashboard
SENDGRID_API_KEY: not-real
POSTMARK_API_KEY: not-real
STRIPE_SUBSCRIPTION_PRICE_ID: not-real
STRIPE_SECRET_KEY: not-real
SWIFT_DETERMINISTIC_HASHING: 1