-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (54 loc) · 1.67 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
56
57
on:
pull_request:
push:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build connet
run: nix develop --command make build
test:
name: Test
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run tests
run: nix develop --command make test
- name: Run lint
run: nix develop --command make lint
- name: Go module tidy
run: nix develop --command go mod tidy
- name: Gen proto
run: nix develop --command make gen
- name: Check if tidy or gen proto changed anything
run: git diff --exit-code
nix-build:
name: Build nix packages
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- name: Build default
run: nix build .
- name: Build docker
run: nix build .#docker