-
Notifications
You must be signed in to change notification settings - Fork 70
45 lines (38 loc) · 1.18 KB
/
elixir-quality-checks.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
name: Elixir Quality Checks
on:
push:
branches:
- master
pull_request:
branches:
- "**"
jobs:
quality_checks:
name: Elixir Quality Checks
runs-on: ubuntu-latest
env:
# In MIX_ENV=test, `$ mix xref graph` shows us a whole bunch of
# test stuff that isn't really relevant.
# The other checks don't really care what environment they run in.
MIX_ENV: dev
elixir: "1.16.2"
otp: "26.1.2"
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Elixir Project
uses: ./.github/actions/elixir-setup
with:
elixir-version: ${{ env.elixir }}
otp-version: ${{ env.otp }}
build-app: false
- name: Check for unused deps
run: mix deps.unlock --check-unused
- name: Check code formatting
run: mix format --check-formatted
# We run all checks here even if others failed so that
# we give devs as much feedback as possible & save some time.
if: always()
- name: Check for compile-time dependencies between modules
run: mix xref graph --label compile-connected --fail-above 0
if: always()