-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (67 loc) · 2.19 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
name: CI
on:
push:
pull_request:
branches:
- "**"
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
otp-version: [25.0.4]
elixir-version: [1.14]
services:
db:
image: postgres:12
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
MIX_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost/naboo_test
CORS_ALLOWED_ORIGINS: "*"
DEBUG_ERRORS: true
PORT: 4000
SECRET_KEY_BASE: "9ysxf4gGDgu7bRRdR7Pe2MHlXNXTFkyoggvW3R8vOK9xWhMznGWh95chlfT2ebi4"
SESSION_KEY: "naboo"
SESSION_SIGNING_SALT: "Gkk+m51xhgOmih90vLGIv3kElBU9uJpuUQE1jcp657KYnJKf1dzhMjQWRHDtXenm"
GUARDIAN_SECRET: "Gkk+m51xhgOmih90vLGIv3kElBU9uJpuUQE1jcp657KYnJKf1dzhMjQWRHDtXenm"
DATABASE_POOL_SIZE: 20
CANONICAL_URL: http://localhost:4000
STATIC_URL: http://localhost:4000
DATABASE_SSL: false
SENDGRID_SENDER_EMAIL: [email protected]
SENDGRID_APIKEY: something
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
elixir-version: ${{ matrix.elixir-version }}
otp-version: ${{ matrix.otp-version }}
- uses: actions/cache@v2
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-deps-${{ hashFiles(format('{0}/mix.lock', github.workspace)) }}
restore-keys: |
${{ runner.os }}-deps-
- uses: actions/cache@v2
id: build-cache
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp-version }}-${{ matrix.elixir-version }}-${{ hashFiles(format('{0}/mix.lock', github.workspace)) }}
- uses: actions/cache@v2
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles(format('{0}/assets/package-lock.json', github.workspace)) }}
restore-keys: |
${{ runner.os }}-npm-
- run: make header
- run: make dependencies
- run: make check
- run: make build-dev
- run: make build