blob: a8cc9bd7ad7499034fab948464a033207fd21f44 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
language: python
python:
- "2.7"
node_js:
- "8"
branches:
only:
- master
- develop
sudo: false
install: "npm install jsonschema json-dup-key-validator"
script:
# won't fail, but print problems
- find . -name 'node_modules' -prune -o \( -name "*.json" -not -name "*Filler.json" -exec echo {} \; -exec python -mjson.tool {} /dev/null \; 2>&1 \) | grep -v -B 1 "^\./" | cat
# will fail, if linting fails
- find . -name 'node_modules' -prune -o \( -name "*.json" -not -name "*Filler.json" -print0 \) | xargs -I file -n1 -0 python -mjson.tool file /dev/null
# run schema tests against GeneralStateTests
- echo "Linting state tests"
- echo -e "$(find GeneralStateTests -name '*.json')" | node JSONSchema/validate.js JSONSchema/st-schema.json
- echo -e "$(find src/GeneralStateTestsFiller -name '*.json')" | node JSONSchema/validate.js JSONSchema/st-filler-schema.json
# run schema tests against BlockchainTests
- echo "Linting blockchain tests"
- echo -e "$(find BlockchainTests -name '*.json')" | node JSONSchema/validate.js JSONSchema/bc-schema.json
|