lix-installer/nix/ci.nix

40 lines
711 B
Nix
Raw Normal View History

2022-09-02 23:03:57 +00:00
{ pkgs }:
let
inherit (pkgs) writeScriptBin;
in
[
# Format
(writeScriptBin "ci-check-rustfmt" "cargo fmt --check")
# Test
(writeScriptBin "ci-test-rust" "cargo test")
# Spelling
(writeScriptBin "ci-check-spelling" ''
codespell \
2022-09-09 19:07:34 +00:00
--ignore-words-list ba,sur,crate,pullrequest,pullrequests,ser \
2022-09-02 23:03:57 +00:00
--skip target \
.
'')
# NixFormatting
(writeScriptBin "ci-check-nixpkgs-fmt" ''
git ls-files '*.nix' | xargs | nixpkgs-fmt --check
'')
# EditorConfig
(writeScriptBin "ci-check-editorconfig" ''
eclint
'')
(writeScriptBin "ci-all" ''
ci-check-rustfmt
ci-test-rust
ci-check-spelling
ci-check-nixpkgs-fmt
ci-check-editorconfig
'')
]