From d2bb696b06308c230b3c2473ac65499c467095da Mon Sep 17 00:00:00 2001 From: Filip Leitner Date: Thu, 10 Oct 2024 13:46:19 +0200 Subject: [PATCH] chore: Add github workflow checking for focused unit tests --- .github/workflows/focused-tests.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/focused-tests.yml diff --git a/.github/workflows/focused-tests.yml b/.github/workflows/focused-tests.yml new file mode 100644 index 0000000000..6d64ee3f9e --- /dev/null +++ b/.github/workflows/focused-tests.yml @@ -0,0 +1,22 @@ +name: Check for Focused Tests + +on: + push: # This triggers the workflow on push to any branch + branches: + - '**' # This matches all branches + +jobs: + check-focused-tests: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Check for fdescribe and fit in projects/hslayers/test + run: | + # Fail the job if any instance of fdescribe( or fit( is found in the specific directory + if grep -r 'fdescribe(' ./projects/hslayers/test || grep -r 'fit(' ./projects/hslayers/test; then + echo "Error: Found focused tests (fdescribe or fit). Please remove them." + exit 1 + fi