-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (57 loc) · 1.6 KB
/
main.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
name: CI
on:
push:
branches: [ main ]
pull_request:
env:
POSTGRES_DB: epicenter_test
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
jobs:
test:
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
matrix:
postgres-version: [16.4-alpine, 17-alpine]
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
otp-version: '27.0.1'
elixir-version: '1.17.2'
- name: Install dependencies
run: |
npm install --prefix assets
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.unlock --check-unused
mix deps.audit
npm audit --audit-level=moderate --prefix assets
mix sobelow --config
- name: Run tests
run: bin/dev/test
env:
CANONICAL_HOST: localhost
LIVE_VIEW_SIGNING_SALT: mZT0Lo72e+U9KLtsTQzdKmmxpda0uuJJlMWTzJYdFBhddwbGbAC3h5T1QusYBhBr
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
SECRET_KEY_BASE: iuJS3FLMrRqbKug/CE4zGGd31eY6FMdmpQGjy8RMaQoxk59wAvSxuUKM6c/uaOo4
continue-on-error: ${{ matrix.postgres-version == '17-alpine' }}