This repository has been archived by the owner on Dec 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.69 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ci-tests-${{ github.ref }}-1
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
matrix:
elixir: ['1.15.7']
otp: ['26.1.2']
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Get deps cache
uses: actions/cache@v2
with:
path: deps/
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Get build cache
uses: actions/cache@v2
with:
path: _build/test/
key: build-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Install Dependencies
run: mix deps.get
- name: Check Dependencies
run: mix hex.outdated
- name: Run Tests
run: mix test
- name: Run code quality check
run: mix credo --strict
# NOTE: --no-check option added to skip check on whether PLT file needs to
# be updated. The version in the cached _build file will be used, hence
# not slowing down the build while the PLT file gets rebuilt.
# The --no-check option will have to be removed on a single build if
# Elixir or Erlang versions update, but can then be re-instated.
- name: Run Dialyzer
# run: mix dialyzer --halt-exit-status
run: mix dialyzer --halt-exit-status --no-check