Skip to content

Commit be57c18

Browse files
committed
ci: Use nix-env to install tools
This is easier to use instead of having to go through nix-shell for each command. This also gets rid of the nix-shell in the shebang for formatters.sh so that we don't require nix-shell for its use. Different versions of tools will be caught by CI anyway so its fine to be lenient for users.
1 parent 3993f26 commit be57c18

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
with:
2222
nix_path: nixpkgs=channel:nixpkgs-unstable
2323

24-
- name: Fetch Nix Derivations
25-
run: nix-shell --command true
24+
- name: Install Nix Packages
25+
run: nix-env -f shell.nix -i -A buildInputs
2626

2727
- name: Install Go tools
28-
run: nix-shell --run 'make tools'
28+
run: make tools
2929

3030
- name: Linters and Go Formatting
31-
run: nix-shell --run 'make verify'
31+
run: make verify
3232

3333
- name: Non Go Formatters
3434
run: ./.github/workflows/formatters.sh
@@ -37,4 +37,4 @@ jobs:
3737
run: sudo apt-get -y update && sudo apt-get -y install zfsutils-linux
3838

3939
- name: Tests
40-
run: nix-shell --run 'sudo make test'
40+
run: sudo make test

.github/workflows/formatters.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#!/usr/bin/env nix-shell
2-
#!nix-shell -i bash ../../shell.nix
3-
#shellcheck shell=bash
1+
#!/usr/bin/env bash
42

53
set -eux
64

0 commit comments

Comments
 (0)