forked from geneontology/go-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
46 lines (41 loc) · 2.49 KB
/
.travis.yml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
language: ruby
rvm: "1.9.3"
dist: trusty
sudo: required
services:
- docker
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y python3 -qq
- sudo apt-get install -y python3-pip -qq
- sudo apt-get install -y mmv
- sudo pip3 install pyyaml
- sudo pip3 install typing
- sudo pip3 install graphstore/rule-runner
- docker pull geneontology/dev-base:latest
## Possible other way.
install:
- gem install kwalify
script:
## Quick user data check.
- kwalify -E -m metadata/users.schema.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -f metadata/users.schema.yaml metadata/users.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -m metadata/groups.schema.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -f metadata/groups.schema.yaml metadata/groups.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -m metadata/db-xrefs.schema.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -m metadata/datasets.schema.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -f metadata/datasets.schema.yaml metadata/datasets/*.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -m metadata/extensions-constraints.schema.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- kwalify -E -f metadata/extensions-constraints.schema.yaml metadata/extensions-constraints.yaml 2>&1 | tee out.log && grep 'INVALID\|ERROR' out.log; test $? -ne 0
- sparta valid --rules metadata/rules/ --schema metadata/rules.schema.yaml
- python3 ./scripts/sanity-check-users-and-groups.py --verbose --users metadata/users.yaml --groups metadata/groups.yaml; test $? -eq 0
## Somewhat awkwardly reuse sparta to check non-go-rules files that
## are still structured yamldown/frontmatter.
- mkdir -p /tmp/foo && mcp 'metadata/gorefs/goref-0000*' '/tmp/foo/gorule-0000#1' && sparta valid --rules /tmp/foo/ --schema metadata/gorefs.schema.yaml
- docker run -it -v $(pwd):/tmp/go-site -w /tmp/go-site geneontology/dev-base:latest /bin/bash -c "pip3 install -r pipeline/requirements.txt && ./scripts/rule-example-validation.sh"
notifications:
email: