-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.05 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
name: CI
on:
push:
branches:
- master
pull_request:
workflow_call:
secrets:
HEX_API_KEY:
required: true
jobs:
test:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
elixir: 1.13.2
otp: 22.2
lint: true
HEX_API_KEY: ${{ secrets.HEX_API_KEY }}
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: 22.2
elixir-version: 1.13.2
- uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-mix-${{env.elixir}}-${{env.otp}}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- run: mix deps.get
- run: mix format --check-formatted
if: ${{ matrix.lint }}
- run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- run: mix deps.compile
- run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- run: mix test
- run: mix hex.publish --yes