Skip to content

Allow api responses to be ordered #57

Allow api responses to be ordered

Allow api responses to be ordered #57

Workflow file for this run

name: Test and QA PR
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Checkout and build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
node-version: [19.8]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
npm install -g ajv-cli jsonlint
- name: Static Pylint code QA
run: pylint --errors-only **/*.py
- name: JSON linting
run: ./scripts/lint-json-dirs
- name: Run pre-commit tests
run: pre-commit run --all-files --verbose
- name: Test with pytest
run: pytest
- name: Compile and validate schema
run: |
ajv compile -s "schema/format.json" -r "schema/types.json" --validate-formats=false
ajv compile -s "schema/par-property.json" -r "schema/types.json" --validate-formats=false
ajv compile -s "schema/preservation-action-type.json" -r "schema/types.json" --validate-formats=false
ajv compile -s "schema/tool.json" -r "schema/types.json" --validate-formats=false
ajv compile -s "schema/preservation-action.json" -r "schema/types.json" -r "schema/format.json" -r "schema/par-property.json" -r "schema/tool.json" -r "schema/preservation-action-type.json" --validate-formats=false --strict=false
ajv compile -s "schema/business-rule.json" -r "schema/preservation-action.json" -r "schema/types.json" -r "schema/format.json" -r "schema/par-property.json" -r "schema/tool.json" -r "schema/preservation-action-type.json" --validate-formats=false --strict=false
ajv compile -s "schema/representation-format.json" -r "schema/types.json" --validate-formats=false --strict=false
ajv validate -s "schema/format.json" -d "examples/fmt-*.json" -r "schema/types.json" --validate-formats=false
ajv validate -s "schema/tool.json" -d "examples/md5*.json" -r "schema/types.json" --validate-formats=false
ajv validate -s "schema/business-rule.json" -d "examples/br-*.json" -r "schema/preservation-action.json" -r "schema/types.json" -r "schema/format.json" -r "schema/par-property.json" -r "schema/tool.json" -r "schema/preservation-action-type.json" --validate-formats=false --strict=false