-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH action to run on pull request whenever there is focused check …
…in the PR Signed-off-by: Parthvi Vala <[email protected]>
- Loading branch information
1 parent
a45154a
commit 3da5114
Showing
5 changed files
with
38 additions
and
3 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 @@ | ||
#!/bin/bash | ||
|
||
# Note: This script has been generated by Gemini AI. | ||
|
||
# Get the absolute path to the repository root | ||
repo_root=$(git rev-parse --show-toplevel) | ||
|
||
# Define the absolute path to the hosted directory | ||
hosted_dir="$repo_root/hosted" | ||
|
||
# Use grep to search for the specified strings within .go files in the hosted directory | ||
grep_result=$(grep -ErnI --include="*.go" -e "FIt" -e "FDescribe" -e "FContext" -e "FWhen" -e "FEntry" -e "FDescribeTable" "$hosted_dir") | ||
|
||
# Check if any matches were found | ||
if [[ -n "$grep_result" ]]; then | ||
echo "Found focused tests (FIt, FDescribe, etc.) in the '$hosted_dir' directory:" | ||
echo "$grep_result" | ||
exit 1 # Exit with a non-zero status to indicate failure | ||
else | ||
echo "No focused tests found in the '$hosted_dir' directory." | ||
exit 0 # Exit with a zero status to indicate success | ||
fi |
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,13 @@ | ||
name: Checking for focused runs | ||
|
||
on: [push] | ||
|
||
jobs: | ||
check-focus-target: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Running the focus check script | ||
run: | | ||
./focus-check.sh |
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
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
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