-
Notifications
You must be signed in to change notification settings - Fork 40
56 lines (52 loc) · 1.64 KB
/
Copy pathelixir.yml
File metadata and controls
56 lines (52 loc) · 1.64 KB
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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Elixir CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1.18.2
with:
version-file: .tool-versions
version-type: strict
- name: Cache dependencies
uses: actions/cache@v4
with:
path: deps
key: deps-${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: deps-${{ runner.os }}-mix-
- name: Cache compiled build
uses: actions/cache@v4
with:
path: |
_build/dev
_build/test
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}-${{ hashFiles('lib/**/*.{ex,eex}', 'config/*.exs', 'mix.exs') }}"
- name: Install dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted
- name: Check unused deps
run: mix deps.unlock --check-unused
- name: Check for missed gettext extractions
run: mix gettext.extract --check-up-to-date
- name: Run Credo
run: mix credo --min-priority high
- name: Run tests
run: mix test
- name: Security audit
run: mix deps.audit
- name: Run Sobelow
run: mix sobelow --exit --threshold high