-
Notifications
You must be signed in to change notification settings - Fork 18
53 lines (48 loc) · 1.2 KB
/
test_format_check.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
name: "Test/Format/Security Check"
on:
workflow_dispatch:
pull_request:
branches:
- "2.0/**"
push:
branches:
- "2.0/**"
env:
CI: true
MIX_ENV: "test"
permissions:
contents: write
jobs:
test:
runs-on: ${{ matrix.os }}
name: Test - OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} / ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
otp: ['27.2.1']
elixir: ['1.18.2']
rebar3: ['3.24.0']
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- uses: ilammy/msvc-dev-cmd@v1
if: startsWith(${{matrix.os}}, 'windows')
with:
arch: x64
- name: Install dependencies
run: mix deps.get
- name: Remove compiled application files
run: mix clean
- name: Compile dependencies
run: mix deps.compile
- name: Compile & lint
run: mix compile --warnings-as-errors
- name: Run tests
run: mix test
- name: Check Formatting
run: mix format --check-formatted
- name: Check Security
run: mix sobelow --config