-
-
Notifications
You must be signed in to change notification settings - Fork 31
75 lines (57 loc) · 1.94 KB
/
elixir_test.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
70
71
72
73
74
75
name: Elixir Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
container:
image: hexpm/elixir:1.17.0-erlang-27.0-debian-bookworm-20240612
steps:
- name: Install git
run: |
apt-get update
apt-get install -y git
- name: Checkout repository and submodules
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
submodules: recursive
- name: Update submodules
run: |
git config --global --add safe.directory /__w/elixir-analyzer/elixir-analyzer
git submodule update --recursive --remote
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Run Tests
run: mix test --exclude external
- name: Update coverage badge on push
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: mix coveralls.github --exclude external
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check formatting
run: mix format --check-formatted
- name: Run Credo
run: mix credo
- name: Retrieve PLT Cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
id: plt-cache
with:
path: priv/plts
key: elixir:1.17.0-erlang-27.0-debian-bookworm-20240612-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}-v3
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer --plt
- name: Run dialyzer
run: mix dialyzer
smoke-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Run Smoke Test in Docker
run: bin/run-tests-in-docker.sh