templates: run 'pre-commit' outside of 'checks'

This allows adding pre-commit checks that can't be run in the sandbox,
such as `clippy` in Rust etc...

Not strictly necessary for the few checks that are enabled in the
current templates, but I like to have very similar setups across the
board.
This commit is contained in:
Bruno BELANYI 2023-05-10 13:17:45 +00:00
parent 9540b1424f
commit 694c0224d3
4 changed files with 10 additions and 4 deletions

View file

@ -2,6 +2,11 @@ labels:
type: exec type: exec
pipeline: pipeline:
- name: pre-commit checks
image: bash
commands:
- nix shell . -c pre-commit run --all
- name: nix flake check - name: nix flake check
image: bash image: bash
commands: commands:

View file

@ -86,8 +86,6 @@
{ {
checks = { checks = {
inherit (self.packages.${system}) project; inherit (self.packages.${system}) project;
inherit pre-commit;
}; };
devShells = { devShells = {

View file

@ -2,6 +2,11 @@ labels:
type: exec type: exec
pipeline: pipeline:
- name: pre-commit checks
image: bash
commands:
- nix shell . -c pre-commit run --all
- name: nix flake check - name: nix flake check
image: bash image: bash
commands: commands:

View file

@ -86,8 +86,6 @@
{ {
checks = { checks = {
inherit (self.packages.${system}) project; inherit (self.packages.${system}) project;
inherit pre-commit;
}; };
devShells = { devShells = {