Skip to content

Commit 1dbd80f

Browse files
committed
feat: add GitHub Actions workflow for testing and formatting checks
1 parent d316819 commit 1dbd80f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/test.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
name: Test
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
elixir: ['1.18']
16+
otp: ['27']
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Elixir
22+
uses: erlef/setup-beam@v1
23+
with:
24+
elixir-version: ${{ matrix.elixir }}
25+
otp-version: ${{ matrix.otp }}
26+
27+
- name: Set up Rust
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
toolchain: stable
31+
override: true
32+
33+
- name: Restore dependencies cache
34+
uses: actions/cache@v4
35+
with:
36+
path: deps
37+
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
38+
restore-keys: ${{ runner.os }}-mix-
39+
40+
- name: Install dependencies
41+
run: mix deps.get
42+
43+
- name: Compile
44+
run: mix compile --warnings-as-errors
45+
46+
- name: Run tests
47+
run: mix test
48+
49+
- name: Check formatting
50+
run: mix format --check-formatted

0 commit comments

Comments
 (0)