-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.57 KB
/
ci.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
'on':
push:
branches:
- main
pull_request:
jobs:
full-tests:
name: Full Tests
runs-on: ubuntu-latest
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v3
- name: Cache deps
id: cache-deps
uses: actions/cache@v3
env:
cache-name: cache-elixir-deps
with:
path: deps
key: >-
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}-${{
hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}-
- name: Cache compiled build
id: cache-build
uses: actions/cache@v3
env:
cache-name: cache-compiled-build
with:
path: _build
key: >-
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}--${{
hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-${{ env.MIX_ENV }}-${{ env.cache-name }}-
${{ runner.os }}-mix-${{ env.MIX_ENV }}-
${{ runner.os }}-mix
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: 1.15.7
otp-version: 26.1.2
- name: Install dependencies
run: mix deps.get
- name: Run format check
run: mix format --check-formatted
- name: Start SurrealDB docker image
run: bin/ci-docker-surreal-restart.sh
- name: Mix test
run: mix test
- name: Stop SurrealDB docker image
run: bin/ci-docker-surreal-stop.sh