Skip to content

Commit d341db1

Browse files
authored
Merge pull request #318 from axelson/use-github-actions
Add basic CI github action
2 parents b8b7a34 + bbf4eae commit d341db1

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
env:
15+
MIX_ENV: test
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
include:
21+
- elixir: '1.11.4'
22+
otp: '24.2'
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
27+
- uses: erlef/setup-beam@v1
28+
with:
29+
otp-version: ${{matrix.otp}}
30+
elixir-version: ${{matrix.elixir}}
31+
32+
- name: Cache build artifacts
33+
uses: actions/cache@v3
34+
with:
35+
path: |
36+
~/.hex
37+
~/.mix
38+
_build
39+
priv/plts
40+
key: ${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
41+
- name: Install Dependencies
42+
run: |
43+
mix local.rebar --force
44+
mix local.hex --force
45+
mix deps.get
46+
- name: Compile Deps
47+
run: mix deps.compile
48+
- name: Compile
49+
run: mix compile
50+
- name: Run Tests
51+
run: mix test

0 commit comments

Comments
 (0)