Merge pull request #727 from oasis-tcs/master #15
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: JSON Schema Tests (CSAF 2.0) | |
on: | |
push: | |
paths: | |
- 'csaf_2.0/**' | |
pull_request: | |
paths: | |
- 'csaf_2.0/**' | |
jobs: | |
json-test_job: | |
runs-on: ubuntu-latest | |
name: Test JSON schemas | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Prepare environment | |
run: | | |
sudo apt-get remove python3-jsonschema | |
sudo apt-get update -q && sudo apt-get install -y --no-install-recommends -qq \ | |
python3 \ | |
python3-simplejson \ | |
python3-jsonpath-rw \ | |
python3-pip \ | |
python3-setuptools \ | |
python3-wheel | |
pip3 install jsonschema[format] | |
- name: Check jsonschema version | |
run: python3 -c "from importlib.metadata import version; print(version('jsonschema'))" | |
- name: Test examples against CSAF schema | |
run: ./csaf_2.0/test/csaf_schema/run_tests.sh | |
- name: Test VEX examples against CSAF schema | |
run: ./csaf_2.0/test/csaf_schema/run_tests.sh csaf_vex | |
- name: Test examples against Provider Metadata schema | |
run: ./csaf_2.0/test/provider_schema/run_tests.sh | |
- name: Test examples against Aggregator schema | |
run: ./csaf_2.0/test/aggregator_schema/run_tests.sh | |
- name: Upload strict JSON schema artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: strict-schemas | |
path: | | |
csaf_2.0/build/csaf_strict_schema.json | |
csaf_2.0/build/provider_strict_schema.json | |
csaf_2.0/build/aggregator_strict_schema.json |