Skip to content

[REF] refactor documentation #5

[REF] refactor documentation

[REF] refactor documentation #5

Workflow file for this run

name: validate protocol and activities
# describes when this workfllow is triggered
on:
push: # when pushing to a branch
branches: [master] # on which branch
pull_request: # when opening a new pull request
branches: "*" # * refers to all branches
jobs:
build:
# describes the operating system that will #be used
runs-on: ubuntu-latest
# Steps represent a sequence of tasks executed as part of the job
steps:
- name: Setup Node # installing Node.js for all the javascript part
uses: actions/[email protected]
# Checks-out your repository under $GITHUB_WORKSPACE,
# so your job can access it
- uses: actions/checkout@v2
# Checks that our JSON are valid
# Installing `jsonlint` to validate the JSON files
# Looking recursively through the directories `protocol`
# and `activities` for any file with "@context" in them
# (that makes them JSON-LD files) and validate their content with jsonlint
- name: Check for syntax errors
run: |
npm install -g jsonlint
grep -r "@context" activities | cut -d: -f1 | xargs -I fname jsonlint -q fname
grep -r "@context" protocols | cut -d: -f1 | xargs -I fname jsonlint -q fname
# Checks that the schemas are valid
# Using python and the installing the reproschema tools
# from the reproschema-py repository to then validate
# the content of the folders containing the JSON-LD files.
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install reproschema requests_cache
- name: Test with pyshacl
run: |
reproschema -l DEBUG validate example_ehi
reproschema -l DEBUG validate examples