-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add github workflow checking for focused unit tests
- Loading branch information
1 parent
4c2cf13
commit d2bb696
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |