-
Notifications
You must be signed in to change notification settings - Fork 19
50 lines (40 loc) · 1.52 KB
/
elixir.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
name: Elixir CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
MIX_ENV: test
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
# NOTE: Reassign the nix store to this to avoid permission issues when
#trying to restoring what was cached by GitHub Actions.
store = /home/runner/nix
# NOTE: Other binary caches for us to use if cache.nixos.org doesn't
# have what we need.
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.iog.io https://cache.nixos.org/
- name: Restore cached nix store
uses: actions/cache@v4
with:
path: /home/runner/nix
key: ${{ runner.os }}-nix-${{ hashFiles('flake.lock') }}
- name: Restore cached mix deps
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: nix develop .#devShells.x86_64-linux.ci --command bash -c "mix local.rebar --force && mix local.hex --force && mix deps.get && mix deps.compile"
- name: Run tests
run: nix develop .#devShells.x86_64-linux.ci --command mix test --color