Skip to content

Commit d08c064

Browse files
committed
Add CI workflow
1 parent 15b402a commit d08c064

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Elixir CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
workflow_dispatch:
8+
9+
env:
10+
FORCE_BUILD: true
11+
MIX_ENV: test
12+
13+
jobs:
14+
test:
15+
strategy:
16+
matrix:
17+
include:
18+
- otp_version: "27.2"
19+
elixir_version: 1.18
20+
21+
runs-on: ubuntu-latest
22+
name: test
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: actions/cache@v4
27+
with:
28+
path: |
29+
_build/test/lib/graphql_query/native/graphql_query_native
30+
~/.cargo/bin/
31+
~/.cargo/registry/index/
32+
~/.cargo/registry/cache/
33+
~/.cargo/git/db/
34+
key: test-native-${{ runner.os }}-${{ hashFiles('native/**/Cargo.lock') }}
35+
restore-keys: |
36+
test-native-${{ runner.os }}
37+
38+
- uses: erlef/setup-beam@v1
39+
with:
40+
otp-version: ${{ matrix.otp_version }}
41+
elixir-version: ${{ matrix.elixir_version }}
42+
43+
- name: Install deps
44+
run: mix deps.get
45+
46+
- name: Compile deps
47+
run: mix deps.compile
48+
49+
- name: Run tests
50+
run: mix test --warnings-as-errors
51+
52+
- name: Compile once again but without optional deps
53+
run: mix compile --force --warnings-as-errors --no-optional-deps
54+
55+
- run: mix format --check-formatted

0 commit comments

Comments
 (0)