-
Notifications
You must be signed in to change notification settings - Fork 2
285 lines (240 loc) · 7.93 KB
/
elixir.yml
File metadata and controls
285 lines (240 loc) · 7.93 KB
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
281
282
283
284
285
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
unit-tests:
name: Unit tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }})
runs-on: ubuntu-24.04
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
include:
- elixir: 1.17.3
otp: 26.2.5.2
coveralls: false
- elixir: 1.18.4
otp: 27.3
coveralls: true
- elixir: 1.18.4
otp: 28.0.1
coveralls: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
- name: Set up Elixir
uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore dependencies cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: |
deps
_build
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install dependencies
run: mix deps.get
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "24"
cache: npm
cache-dependency-path: package.json
- name: Install npm dependencies
run: npm install
- name: Check JavaScript (prettier + eslint)
run: npm run check
- name: Run tests and post coverage to Coveralls
if: matrix.coveralls
run: mix coveralls.github
- name: Run tests
if: ${{ !matrix.coveralls }}
run: mix test
e2e-tests:
name: E2E tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }})
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- elixir: 1.17.3
otp: 26.2.5.2
- elixir: 1.18.4
otp: 27.3
- elixir: 1.18.4
otp: 28.0.1
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: e2e_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1
with:
version: 10.33.0
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "24"
cache: pnpm
cache-dependency-path: e2e/pnpm-lock.yaml
- name: Install e2e JS dependencies
working-directory: e2e
run: pnpm install --frozen-lockfile
- name: Set up Elixir
uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore E2E dependencies cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: |
e2e/deps
e2e/_build
key: deps-e2e-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('e2e/mix.lock') }}
restore-keys: |
deps-e2e-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install E2E dependencies
working-directory: e2e
run: mix deps.get
env:
MIX_ENV: test
- name: Setup database
working-directory: e2e
run: mix ecto.setup
env:
MIX_ENV: test
- name: Run E2E tests
working-directory: e2e
run: mix test --timeout 600000
env:
MIX_ENV: test
installer-tests:
name: Installer tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }})
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- elixir: 1.17.3
otp: 26.2.5.2
- elixir: 1.18.4
otp: 27.3
- elixir: 1.18.4
otp: 28.0.1
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Elixir
uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore installer dependencies cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: |
installer/deps
installer/_build
key: deps-installer-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('installer/mix.lock') }}
restore-keys: |
deps-installer-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install installer dependencies
working-directory: installer
run: mix deps.get
- name: Run installer tests
working-directory: installer
run: mix test
integration-tests:
name: Integration tests (OTP ${{ matrix.otp }} | Elixir ${{ matrix.elixir }})
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- elixir: 1.17.3
otp: 26.2.5.2
- elixir: 1.18.4
otp: 27.3
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Elixir
uses: erlef/setup-beam@3580539ceec3dc05b0ed51e9e10b08eb7a7c2bb4
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Restore integration test dependencies cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: |
integration_test/deps
integration_test/_build
key: deps-integration-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('integration_test/mix.lock') }}
restore-keys: |
deps-integration-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- name: Install integration test dependencies
working-directory: integration_test
run: mix deps.get
- name: Install installer dependencies and local corex_new archive
working-directory: installer
run: |
mix deps.get
mix archive.build -o corex_new.ez
mix archive.install corex_new.ez --force
- name: Install Mix archives for corex.new (phx_new)
run: mix archive.install hex phx_new --force
- name: Run integration tests (no database tag)
working-directory: integration_test
env:
MIX_ENV: test
run: mix test --timeout 1200000
- name: Run integration tests (PostgreSQL)
working-directory: integration_test
env:
MIX_ENV: test
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
PGPORT: "5432"
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
run: mix test --include database:postgresql --timeout 1200000
- name: Run integration tests (SQLite3)
working-directory: integration_test
env:
MIX_ENV: test
run: mix test --include database:sqlite3 --timeout 1200000