-
Notifications
You must be signed in to change notification settings - Fork 126
73 lines (71 loc) · 2.18 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
63
64
65
66
67
68
69
70
71
72
73
on:
- push
- pull_request
jobs:
codeQuality:
name: "Tests & Code Quality"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
otpElixir: [
{otp: "24.3.4.10", elixir: "1.14.3"}
]
steps:
- name: repo checkout
uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otpElixir.otp }}
elixir-version: ${{ matrix.otpElixir.elixir }}
- uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-${{matrix.otpElixir.otp}}-${{matrix.otpElixir.elixir}}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.otpElixir.otp}}-${{matrix.otpElixir.elixir}}-mix-
- run: mix deps.get
- run: mix credo --strict
continue-on-error: true
- run: mix format --check-formatted
continue-on-error: true
- run: mix dialyzer
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
mongodb: ["4.4", "5.0"]
otpElixir: [
{otp: "22.3.4.26", elixir: "1.12.3"},
{otp: "23.3.4.18", elixir: "1.13.4"},
{otp: "24.3.4.10", elixir: "1.14.3"}
]
topology: [replica_set, server]
steps:
- name: repo checkout
uses: actions/checkout@v2
- id: start-mongodb
name: start mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: "${{matrix.mongodb}}"
topology: "${{matrix.topology}}"
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otpElixir.otp }}
elixir-version: ${{ matrix.otpElixir.elixir }}
- uses: actions/cache@v2
with:
path: |
deps
_build
key: ${{ runner.os }}-${{matrix.otpElixir.otp}}-${{matrix.otpElixir.elixir}}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-${{matrix.otpElixir.otp}}-${{matrix.otpElixir.elixir}}-mix-
- run: mix deps.get
- run: mix test
env:
MONGODB_URI: ${{ steps.start-mongodb.outputs.cluster-uri }}