-
Notifications
You must be signed in to change notification settings - Fork 14
59 lines (55 loc) · 1.49 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
name: Build and test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.11.1
otp: 21.3.8.17
- elixir: 1.11.4
otp: 23.2
- elixir: 1.12.3
otp: 24.1
- elixir: 1.13.4
otp: 24.1
- elixir: 1.13.4
otp: 25.0
check_formatted: true
run_plugin_tests: true
warnings_as_errors: true
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
experimental-otp: true
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- run: mix format --check-formatted
if: matrix.check_formatted
- name: Install Dependencies
run: |
mix local.hex --force
mix local.rebar --force
mix deps.get --only test
- run: mix compile --warnings-as-errors
if: matrix.warnings_as_errors
- run: mix test
if: matrix.run_plugin_tests
- run: mix test --exclude plugin
if: ${{ !matrix.run_plugin_tests }}