Add ministries of Ghana and fix workflow #7
Workflow file for this run
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
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 | |
with: | |
fetch-depth: 0 # Ensure full history is fetched | |
- name: Fetch default branch | |
run: git fetch origin main # Adjust 'main' if your default branch is named differently | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: Check changed .rq files | |
id: check-files | |
run: | | |
echo "Debugging CHANGED_FILES..." | |
echo "Comparing commits:" | |
git diff --name-only origin/main...HEAD -- '*.rq' | |
# Get a list of .rq files changed in the PR | |
CHANGED_FILES=$(git diff --name-only origin/main...HEAD -- '*.rq') | |
for file in $CHANGED_FILES; do | |
echo "Running script on $file" | |
python scripts/check-expected-results-count.py --path "$file" | |
done |