Skip to content

Commit d82693f

Browse files
authored
Migrate CI from Travis to GitHub Actions, adding recommended Elixir and Erlang/OTP combinations (michalmuskala#112)
1 parent c12a20f commit d82693f

File tree

2 files changed

+61
-36
lines changed

2 files changed

+61
-36
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Elixir CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
mix_test:
11+
name: mix test (Elixir ${{matrix.elixir}} | OTP ${{matrix.otp}})
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- elixir: 1.4.x
18+
otp: 18.3.4.11
19+
- elixir: 1.5.x
20+
otp: 18.3.4.11
21+
- elixir: 1.6.x
22+
otp: 19.3.6.13
23+
- elixir: 1.7.x
24+
otp: 19.3.6.13
25+
- elixir: 1.8.x
26+
otp: 20.3.8.26
27+
- elixir: 1.9.x
28+
otp: 20.3.8.26
29+
warnings_as_errors: true # 1.10 is not enough as its --warnigs-as-errors has bugs https://github.com/elixir-lang/elixir/issues/10073
30+
- elixir: 1.10.x
31+
otp: 21.3.8.17
32+
- elixir: 1.10.x
33+
otp: 23.0.3
34+
warnings_as_errors: true
35+
static_analysis: true
36+
env:
37+
MIX_ENV: test
38+
steps:
39+
- uses: actions/checkout@v2
40+
- uses: actions/setup-elixir@v1
41+
with:
42+
otp-version: ${{matrix.otp}}
43+
elixir-version: ${{matrix.elixir}}
44+
- name: Install Dependencies
45+
run: |
46+
mix local.hex --force
47+
mix local.rebar --force
48+
mix deps.get --only test
49+
- name: Cache build artifacts
50+
uses: actions/cache@v2
51+
with:
52+
path: |
53+
~/.hex
54+
~/.mix
55+
_build
56+
key: ${{ matrix.otp }}-${{ matrix.elixir }}-build
57+
- run: mix compile --warnings-as-errors
58+
if: matrix.warnings_as_errors
59+
- run: mix test
60+
- run: mix dialyzer --halt-exit-status
61+
if: matrix.static_analysis

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)