mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
ci: add nix code formatting check
This commit is contained in:
parent
3f1af1a94f
commit
2d916a5255
3 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
test:
|
||||
script:
|
||||
- nix-build --no-out-link --show-trace tests
|
||||
|
||||
nixpkgs-fmt:
|
||||
script:
|
||||
- ./check-fmt
|
||||
|
|
10
check-fmt
Executable file
10
check-fmt
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash
|
||||
#
|
||||
# Just because the nixpkgs-fmt error message is not super readable. Used by
|
||||
# CI.
|
||||
|
||||
if ! nixpkgs-fmt --check . ; then
|
||||
echo 'run `nixpkgs-fmt .` to fix it'
|
||||
exit 1
|
||||
fi
|
|
@ -6,5 +6,6 @@ in
|
|||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
poetry
|
||||
pkgs.nixpkgs-fmt
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue