From 694c0224d376af92877bae811b5dd544f2ccd55c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 10 May 2023 13:17:45 +0000 Subject: [PATCH] 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. --- templates/c++-cmake/.woodpecker/check.yml | 5 +++++ templates/c++-cmake/flake.nix | 2 -- templates/c++-meson/.woodpecker/check.yml | 5 +++++ templates/c++-meson/flake.nix | 2 -- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/templates/c++-cmake/.woodpecker/check.yml b/templates/c++-cmake/.woodpecker/check.yml index c3b00ef..02ed44b 100644 --- a/templates/c++-cmake/.woodpecker/check.yml +++ b/templates/c++-cmake/.woodpecker/check.yml @@ -2,6 +2,11 @@ labels: type: exec pipeline: +- name: pre-commit checks + image: bash + commands: + - nix shell . -c pre-commit run --all + - name: nix flake check image: bash commands: diff --git a/templates/c++-cmake/flake.nix b/templates/c++-cmake/flake.nix index cb468e7..6216356 100644 --- a/templates/c++-cmake/flake.nix +++ b/templates/c++-cmake/flake.nix @@ -86,8 +86,6 @@ { checks = { inherit (self.packages.${system}) project; - - inherit pre-commit; }; devShells = { diff --git a/templates/c++-meson/.woodpecker/check.yml b/templates/c++-meson/.woodpecker/check.yml index c3b00ef..02ed44b 100644 --- a/templates/c++-meson/.woodpecker/check.yml +++ b/templates/c++-meson/.woodpecker/check.yml @@ -2,6 +2,11 @@ labels: type: exec pipeline: +- name: pre-commit checks + image: bash + commands: + - nix shell . -c pre-commit run --all + - name: nix flake check image: bash commands: diff --git a/templates/c++-meson/flake.nix b/templates/c++-meson/flake.nix index 9cfed0d..36b95a7 100644 --- a/templates/c++-meson/flake.nix +++ b/templates/c++-meson/flake.nix @@ -86,8 +86,6 @@ { checks = { inherit (self.packages.${system}) project; - - inherit pre-commit; }; devShells = {