From 7b68e3c650da6df0c64b498409689c28e74a6b62 Mon Sep 17 00:00:00 2001 From: Thomas Schaffter Date: Mon, 7 Oct 2024 20:21:32 -0700 Subject: [PATCH] feat(sage-monorepo): test the projects affected by the staged files (#2888) --- lint-staged.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lint-staged.config.js b/lint-staged.config.js index 77dc42704..97f10d66e 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -40,4 +40,10 @@ module.exports = { // Lint files with SQLFluff `poetry run sqlfluff lint ${filenames.join(' ')}`, ], + + '**/*': (filenames) => [ + // Test the projects affected by the staged files. This task assumes that formatting files and + // testing affected projects can be safely run in parallel. + `nx affected --target=test --files=${filenames.join(',')}`, + ], };