Run validation job in CI when schemas change (#29) #23
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
# for more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Validate test data | |
on: | |
push: | |
branches: | |
- "**" | |
paths: | |
- '.github/workflows/validator.yaml' | |
- 'schema/**' | |
- 'test-data-validator/**' | |
- 'test-data/**' | |
pull_request: | |
branches: | |
- "main" | |
paths: | |
- '.github/workflows/validator.yaml' | |
- 'schema/**' | |
- 'test-data-validator/**' | |
- 'test-data/**' | |
permissions: | |
contents: read | |
jobs: | |
run-validator: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./test-data-validator | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run validator | |
run: | | |
python validator.py |