-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (67 loc) · 1.77 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
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
branches:
- "main"
paths-ignore:
- "**/*.md"
- ".editorconfig"
- ".gitignore"
pull_request:
branches:
- "*"
paths-ignore:
- "**/*.md"
- ".editorconfig"
- ".gitignore"
jobs:
test:
name: Run Mix Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: "1.14"
otp-version: "25"
- name: Install minimal stable Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Restore Mix Dependency Cache
id: cache-mix-deps
uses: actions/cache@v3
with:
path: |
./deps
./_build
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
- name: Install Mix Dependencies
if: steps.cache-mix-deps.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.clean --all
mix deps.get
mix deps.compile
- name: Check Formatting
run: mix format --check-formatted
- name: Check For Unused Dependencies
run: mix deps.unlock --check-unused
- run: mix deps.compile
env:
HUMAN_NAME_BUILD: 1
- run: mix compile --warnings-as-errors
env:
HUMAN_NAME_BUILD: 1
MIX_ENV: test
- name: Run Tests
run: HUMAN_NAME_BUILD=1 mix coveralls.github
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}