-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.04 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
name: actions
on: push
jobs:
test:
runs-on: ubuntu-latest
env:
MIX_ENV: test
services:
postgres:
image: postgres:12
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-elixir@v1
with:
otp-version: 22.3.2
elixir-version: 1.10.2
- uses: actions/cache@v1
with:
path: deps
key: ${{ runner.os }}-v1-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- run: mix deps.get
- uses: actions/cache@v1
with:
path: _build
key: ${{ runner.os }}-v1-build-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- run: mix compile --warnings-as-errors
- run: mix test
- run: mix format --check-formatted
- run: mix credo --strict