Update gorules_test_errors.gaf #682
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
validate_yaml_and_metadata: | |
runs-on: ubuntu-latest | |
container: geneontology/dev-base:latest | |
steps: | |
- uses: actions/checkout@v2 | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
# uses: ruby/setup-ruby@v1 | |
# - name: Set up Ruby | |
# uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0 | |
# with: | |
# ruby-version: 2.2.10 | |
- name: Install packages | |
run: apt-get update -qq && apt-get install -y kwalify python3 python3-pip mmv -qq | |
- name: Install python stuff | |
run: pip3 install pyyaml typing graphstore/rule-runner | |
## Users. | |
- name: Test users schema. | |
run: | | |
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1 | |
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
- name: Test users metadata. | |
run: | | |
kwalify -E -f metadata/users.schema.yaml metadata/users.yaml 2>&1 | |
kwalify -E -f metadata/users.schema.yaml metadata/users.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
## Groups. | |
- name: Test groups schema. | |
run: | | |
kwalify -E -m metadata/groups.schema.yaml 2>&1 | |
kwalify -E -m metadata/groups.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
- name: Test groups metadata. | |
run: | | |
kwalify -E -f metadata/groups.schema.yaml metadata/groups.yaml 2>&1 | |
kwalify -E -f metadata/groups.schema.yaml metadata/groups.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
## DB Xrefs. | |
- name: Test dbxrefs schema. | |
run: | | |
kwalify -E -m metadata/db-xrefs.schema.yaml 2>&1 | |
kwalify -E -m metadata/db-xrefs.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
- name: Test dbxrefs metadata. | |
run: | | |
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1 | |
kwalify -E -f metadata/db-xrefs.schema.yaml metadata/db-xrefs.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
## Datasets. | |
- name: Test datasets schema. | |
run: | | |
kwalify -E -m metadata/datasets.schema.yaml 2>&1 | |
kwalify -E -m metadata/datasets.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
- name: Test datasets metadata. | |
run: | | |
kwalify -E -f metadata/datasets.schema.yaml metadata/datasets/*.yaml 2>&1 | |
kwalify -E -f metadata/datasets.schema.yaml metadata/datasets/*.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
## Extension constraints. | |
- name: Test extension constraints schema. | |
run: | | |
kwalify -E -m metadata/extensions-constraints.schema.yaml 2>&1 | |
kwalify -E -m metadata/extensions-constraints.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
- name: Test extension constraints metadata. | |
run: | | |
kwalify -E -f metadata/extensions-constraints.schema.yaml metadata/extensions-constraints.yaml 2>&1 | |
kwalify -E -f metadata/extensions-constraints.schema.yaml metadata/extensions-constraints.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
## GO reference species set. | |
- name: Test reference species set schema. | |
run: | | |
kwalify -E -m metadata/go-reference-species.schema.yaml 2>&1 | |
kwalify -E -m metadata/go-reference-species.schema.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
- name: Test reference species set metadata. | |
run: | | |
kwalify -E -f metadata/go-reference-species.schema.yaml metadata/go-reference-species.yaml 2>&1 | |
kwalify -E -f metadata/go-reference-species.schema.yaml metadata/go-reference-species.yaml 2>&1 | grep 'INVALID\|ERROR' > invalid.log || true | |
test $(stat -c %s invalid.log) -eq 0 | |
## Cross-test metadata | |
- name: Cross-test users and groups. | |
run: python3 ./scripts/sanity-check-users-and-groups.py --verbose --users metadata/users.yaml --groups metadata/groups.yaml | |
- name: Info | |
run: which sparta | |
## SPARTA | |
- name: SPARTA. | |
run: sparta valid --rules metadata/rules/ --schema metadata/rules.schema.yaml | |
## Reuse sparta to check non-go-rules files that are still | |
## structured yamldown/frontmatter. | |
- name: SPARTA (other) | |
run: mkdir -p /tmp/foo && mcp 'metadata/gorefs/goref-0000*' '/tmp/foo/gorule-0000#1' && sparta valid --rules /tmp/foo/ --schema metadata/gorefs.schema.yaml | |
## Run GO Rule examples | |
- name: GO Rule example validation | |
run: pip3 install -r pipeline/requirements.txt && ./scripts/rule-example-validation.sh |