-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
613 additions
and
643 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
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 `activities` and `protocols` folders. | ||
- 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 activities | ||
reproschema -l DEBUG validate protocols |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,5 @@ | |
- compute specification | ||
- input type | ||
- item | ||
- JSON | ||
- JSON-LD | ||
- protocol | ||
- SHACL | ||
- visibility |
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
Oops, something went wrong.