From 629607c95fe9382fbf2dafe88b4cc9f6b62dea55 Mon Sep 17 00:00:00 2001 From: Matthew Rathbone Date: Fri, 17 Dec 2021 14:19:37 -0600 Subject: [PATCH] making sure I don't leave a .only in the tests --- .github/workflows/studio-test.yml | 3 +++ bin/check-for-only-tests.sh | 14 ++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 bin/check-for-only-tests.sh diff --git a/.github/workflows/studio-test.yml b/.github/workflows/studio-test.yml index e55860bee..fea95d260 100644 --- a/.github/workflows/studio-test.yml +++ b/.github/workflows/studio-test.yml @@ -32,6 +32,9 @@ jobs: - name: Lint run: yarn workspace beekeeper-studio run lint + - name: Check for bad files + run: bin/check-for-only-tests.sh + - name: Unit Tests run: yarn workspace beekeeper-studio run test:unit --ci --silent diff --git a/bin/check-for-only-tests.sh b/bin/check-for-only-tests.sh new file mode 100755 index 000000000..bf1644bcb --- /dev/null +++ b/bin/check-for-only-tests.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +git grep -a "\.only" apps/studio/tests/ +STATUS=$? + +if [[ $STATUS -eq 0 ]] +then + echo "Found tests with .only still there" + exit 1; + +else + echo "tests look good" + exit 0 +fi