-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (42 loc) · 1.29 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
46
47
name: Elixir Quality Checks
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
quality_checks:
name: Formatting, and Unused Deps
runs-on: ubuntu-latest
strategy:
matrix:
elixir: ["1.16.2"]
otp: ["25.3.2"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Elixir Project
uses: ./.github/actions/elixir-setup
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
build-app: false
- name: Check for unused deps
run: mix deps.unlock --check-unused
- name: Check code formatting
run: mix format --check-formatted
# Check formatting even if there were unused deps so that
# we give devs as much feedback as possible & save some time.
if: always()
- name: Run Credo
run: mix credo suggest --min-priority=normal
# Run Credo even if formatting or the unused deps check failed
if: always()
# - name: Check for compile-time dependencies
# run: mix xref graph --label compile-connected --fail-above 0
# if: always()
# - name: Check for security vulnerabilities in Phoenix project
# run: mix sobelow
# if: always()