Skip to content

Commit

Permalink
Add Nix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jchv committed Jun 23, 2024
1 parent 2916baa commit 28dedca
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Nix
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Nix Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v11
- uses: DeterminateSystems/magic-nix-cache-action@v6
- uses: DeterminateSystems/flake-checker-action@v7
with:
ignore-missing-flake-lock: false
fail-mode: true
- name: Build
run: nix build
- name: Check formatting
run: nix develop --command nixfmt --check **.nix
- name: Run Dev Shell Build
run: nix develop --command go build ./...
- name: Run Dev Shell Tests
run: nix develop --command go test ./...
- name: Flake Check
run: nix flake check --all-systems
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
};
default = pangfiles;
};
devShell = pkgs.mkShell {
devShells.default = pkgs.mkShell {
packages = [
pkgs.git
pkgs.gopls
pkgs.gotools
pkgs.go_1_22
pkgs.gnumake
pkgs.nixfmt-rfc-style
] ++ deps;
};
}
Expand Down

0 comments on commit 28dedca

Please sign in to comment.