mirror of
https://github.com/Smaug123/nix-dotfiles
synced 2025-10-10 08:58:39 +00:00
Add more linting (#20)
This commit is contained in:
44
.github/workflows/lint.yaml
vendored
44
.github/workflows/lint.yaml
vendored
@@ -7,10 +7,44 @@ on:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v3"
|
||||
- name: "Install Nix"
|
||||
uses: "cachix/install-nix-action@v17"
|
||||
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
|
||||
- name: "Run Shellcheck"
|
||||
run: "nix develop --command bash -c \"find . -type f -name '*.sh' | xargs shellcheck\""
|
||||
|
||||
format:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v3"
|
||||
- name: "Install Nix"
|
||||
uses: "cachix/install-nix-action@v17"
|
||||
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
|
||||
- name: "Run Alejandra"
|
||||
run: "nix develop --command alejandra --check ."
|
||||
|
||||
flake-check:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: "actions/checkout@v3"
|
||||
- name: "Install Nix"
|
||||
uses: "cachix/install-nix-action@v17"
|
||||
with: { "extra_nix_config": "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}" }
|
||||
- name: "Check flake"
|
||||
run: "nix flake check --all-systems"
|
||||
|
||||
all-required-checks-complete:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- run: "echo \"All required checks complete.\""
|
||||
needs:
|
||||
- "shellcheck"
|
||||
- "format"
|
||||
- "flake-check"
|
||||
|
0
firmware/copy-from-host.txt
Normal file
0
firmware/copy-from-host.txt
Normal file
15
flake.nix
15
flake.nix
@@ -106,5 +106,20 @@
|
||||
];
|
||||
};
|
||||
};
|
||||
devShells = let
|
||||
devShell = system: (
|
||||
let
|
||||
pkgs = import nixpkgs {inherit config system;};
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [pkgs.alejandra pkgs.shellcheck];
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
builtins.listToAttrs (builtins.map (system: {
|
||||
name = system;
|
||||
value = devShell system;
|
||||
}) ["aarch64-darwin" "aarch64-linux" "x86_64-linux"]);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user