Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate test cases against a schema #778

Merged
merged 5 commits into from
May 6, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/validate_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Validate test data

on:
push:
branches:
- main
echeran marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches: '**'
eemeli marked this conversation as resolved.
Show resolved Hide resolved

jobs:
run_all:
name: Validate tests using schema
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install CLI tool for JSON Schema validation
run: npm install --global ajv-cli
- name: Validate tests using the latest schema version
run: |
ajv validate --spec=draft2020 \
-s $(ls -1v schemas/*/*schema.json | tail -1) \
-d 'tests/**/*.json'
echeran marked this conversation as resolved.
Show resolved Hide resolved
working-directory: ./test