-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ Add workflow that runs query checker script
Fixes #436
- Loading branch information
Showing
1 changed file
with
34 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,34 @@ | ||
name: Run check expected count script on changed queries | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '**/*.rq' # Only run when .rq files are modified | ||
|
||
jobs: | ||
check_files: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: List changed .rq files | ||
id: list-files | ||
run: | | ||
# Get a list of .rq files changed in the PR | ||
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- '*.rq') | ||
echo "files=$CHANGED_FILES" >> $GITHUB_ENV | ||
- name: Run script on each .rq file | ||
if: env.files != '' | ||
run: | | ||
for file in ${{ env.files }}; do | ||
echo "Running script on $file" | ||
python scripts/check-expected-results-count.py --path "$file" | ||
done |