Skip to content

tests

tests #208

Workflow file for this run

# This workflow will validate the mzQC example files against the JSON schema.
name: tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 0 1 1/1 *" # Run monthly.
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install jsonschema
- name: Validate mzQC files
run: |
for i in ./specification_documents/examples/*.mz[qQ][cC]; do
echo "Syntactic validating of $i"
jsonschema -i $i ./schema/mzqc_schema.json
if [ $? -ne 0 ]; then
echo "Failed to validate $i"
exit 1
fi
done