generated from mrcjkb/nix-flake-github-ci-template
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.64 KB
/
nix-build.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
56
57
58
59
60
61
name: "Nix build"
on:
pull_request:
push:
jobs:
checks:
runs-on: ubuntu-latest
name: Nix checks
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- uses: cachix/cachix-action@v13
with:
name: neorocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix flake check -L
build:
name: ${{ matrix.attribute }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
attribute:
- .#neorocks
- .#neovim-nightly
- .#devShells.x86_64-linux.default
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- uses: cachix/cachix-action@v13
with:
name: neorocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build --accept-flake-config "${{matrix.attribute}}" -L
tests:
runs-on: ubuntu-latest
name: Integration test
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- uses: cachix/cachix-action@v13
with:
name: neorocks
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run integration tests
run: |
nix profile install --accept-flake-config ".#neorocks"
cd testproject
luarocks init
luarocks config --scope project lua_interpreter neolua
luarocks test
rm -r lua_modules/ .luarocks/ luarocks
luarocks init
luarocks config --scope project lua_interpreter neolua-nightly
luarocks test
shell: bash