-
Notifications
You must be signed in to change notification settings - Fork 18
70 lines (55 loc) · 1.84 KB
/
ci.yaml
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
name: Continuous Integration
on: push
env:
# OS: ubuntu-latest
OTP_VERSION: 25.1.2
ELIXIR_VERSION: 1.14.1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MIX_ENV: test
jobs:
test:
name: Run on ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: checkout code into workspace directory
uses: actions/checkout@v2
- name: The OTP ${{ env.OTP_VERSION }} and Elixir ${{ env.ELIXIR_VERSION }} will be installed...
uses: erlef/setup-elixir@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- uses: actions/cache@v1
id: deps-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix-
- uses: actions/cache@v1
id: build-cache
with:
path: _build
key: ${{ runner.os }}-build-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-build-
- uses: actions/cache@v1
id: plts-cache
with:
path: priv/plts
key: ${{ runner.os }}-erlef-dialyzer-${{ env.OTP_VERSION }}-${{ env.ELIXIR_VERSION }}-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-erlef-dialyzer-
- name: install dependencies
run: mix deps.get
- name: compile
run: mix compile --warnings-as-errors
- name: format
run: mix format --check-formatted
- name: credo
run: mix credo
- name: dialyzer
run: mix dialyzer
- name: test
run: mix test
- name: coveralls
run: MIX_ENV=test mix coveralls.github