-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (54 loc) · 1.39 KB
/
elixir.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
name: Elixir CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
container: elixir:${{ matrix.elixir_version }}-slim
strategy:
matrix:
elixir_version: ["1.13", "1.17"]
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Install packages
run: |
apt-get update
# Needed for coveralls
apt-get install -y git
- name: Checkout repository
uses: actions/checkout@v3
- name: Get deps cache
uses: actions/cache@v3
id: mix-cache
with:
path: |
_build/test
deps
key: ${{ runner.os }}-${{ matrix.elixir_version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install Mix tools
run: |
mix local.hex --force
mix local.rebar --force
- name: Install Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix deps.get
mix compile
- name: Run Tests
run: mix test --trace
- name: Check Formatting
run: mix format --dry-run --check-formatted
- name: Run Credo
run: mix credo --strict
- name: Post Coverage
run: mix coveralls.github