add shellcheck to flake instead

This commit is contained in:
Jörg Thalheim committed 2023-01-10 08:05:45 +01:00
1 parent 5a4d706e52
commit a6a7ccbc9b
2 files changed
+10 -22

No files matched your search

-18
View File
@@ -1,18 +0,0 @@
name: test
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize]
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3.2.0
- name: Install Nix
uses: cachix/install-nix-action@v18
with:
extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: ShellCheck
run: nix-shell --packages git shellcheck --pure --run 'shellcheck disk-deactivate/disk-deactivate disko'
+10 -4
View File
@@ -25,14 +25,20 @@
default = self.packages.${system}.disko;
});
# TODO: disable bios-related tests on aarch64...
# Run checks: nix flake check -L
checks = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in
# Run tests: nix flake check -L
import ./tests {
nixosTests = import ./tests {
inherit pkgs;
makeTest = import (pkgs.path + "/nixos/tests/make-test-python.nix");
eval-config = import (pkgs.path + "/nixos/lib/eval-config.nix");
});
};
shellcheck = pkgs.runCommand "shellcheck" { nativeBuildInputs = [ pkgs.shellcheck ]; } ''
cd ${./.}
shellcheck disk-deactivate/disk-deactivate disko
touch $out
'';
in
nixosTests // { inherit shellcheck; });
};
}