commit
1e6ca3d372
25
.github/workflows/tests.yml
vendored
Normal file
25
.github/workflows/tests.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: Integrity checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-v*
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-v*
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- name: cd
|
||||
run: cd $GITHUB_WORKSPACE
|
||||
- name: pip install
|
||||
run: pip install -r tests/requirements.txt
|
||||
- name: pytest
|
||||
run: pytest
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.vscode
|
||||
build
|
||||
_build
|
||||
**.pyc
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft/2019-09/schema",
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
"title": "memon",
|
||||
"description": "A jubeat chart set description format based on json",
|
||||
"type": "object",
|
||||
|
2
tests/requirements.txt
Normal file
2
tests/requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
jschon<1
|
||||
pytest<7
|
11
tests/test_schema.py
Normal file
11
tests/test_schema.py
Normal file
@ -0,0 +1,11 @@
|
||||
import json
|
||||
from jschon.catalogue import jsonschema_2019_09
|
||||
from jschon.jsonschema import JSONSchema
|
||||
|
||||
def test_that_the_schema_follows_the_metaschema():
|
||||
jsonschema_2019_09.initialize()
|
||||
with open("schema.json") as file:
|
||||
raw = json.load(file)
|
||||
schema = JSONSchema(raw)
|
||||
schema.validate()
|
||||
|
Loading…
Reference in New Issue
Block a user