Skip to content

Commit

Permalink
✅ Add workflow that runs query checker script
Browse files Browse the repository at this point in the history
Fixes #436
  • Loading branch information
Ainali committed Nov 17, 2024
1 parent 45c781c commit 47dd3bb
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/run-expected-count-script-on-pr.yml
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

0 comments on commit 47dd3bb

Please sign in to comment.