mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
add shellcheck to flake instead
This commit is contained in:
parent
5a4d706e52
commit
a6a7ccbc9b
2 changed files with 10 additions and 22 deletions
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
|
|
@ -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'
|
||||
14
flake.nix
14
flake.nix
|
|
@ -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; });
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue