Skip to content

Commit 81d6292

Browse files
committed
feat: Adding CI. #1
1 parent f268808 commit 81d6292

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: mix
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "07:00"
8+
timezone: Europe/London

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
name: Build and test
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
otp: ['24.3.4']
16+
elixir: ['1.14.1']
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Elixir
20+
uses: erlef/setup-beam@v1
21+
with:
22+
otp-version: ${{ matrix.otp }}
23+
elixir-version: ${{ matrix.elixir }}
24+
- name: Restore deps and _build cache
25+
uses: actions/cache@v3
26+
with:
27+
path: |
28+
deps
29+
_build
30+
key: deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
31+
restore-keys: |
32+
deps-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
33+
- name: Install dependencies
34+
run: mix deps.get
35+
- name: Check code is formatted
36+
run: mix format --check-formatted
37+
- name: Run Tests
38+
run: mix coveralls.json
39+
env:
40+
MIX_ENV: test
41+
AUTH_API_KEY: ${{ secrets.AUTH_API_KEY }}
42+
- name: Upload coverage to Codecov
43+
uses: codecov/codecov-action@v1

0 commit comments

Comments
 (0)