-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 950 Bytes
/
ci.yml
File metadata and controls
37 lines (34 loc) · 950 Bytes
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
name: Elixir CI/CD
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.14.3" # Define the elixir version [required]
otp-version: "25.2.1" # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v3
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Setup mix dependencies
run: mix deps.get
- name: Run lint check
run: mix format --check-formatted
- name: Run tests w/ coverage report
run: mix test