Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a basic github action and Taskfile to verify that the rdf files a… #9

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check Serialization

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check out Vocabulary Repository 📄
uses: actions/checkout@v4
- name: Run CI Tasks ⚙️
run: task ci
43 changes: 43 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: '3'

vars:
UID:
sh: id -u
GID:
sh: id -g
SHELL_PWD:
sh: pwd

DOCKER_PWD: /data
DOCKER_DIRS: -v "{{.SHELL_PWD}}:{{.DOCKER_PWD}}" -w {{.DOCKER_PWD}}
DOCKER_PARAMS_DEFAULT: -u {{.UID}}:{{.GID}} --rm
DOCKER_PARAMS: '{{.DOCKER_PARAMS | default .DOCKER_PARAMS_DEFAULT }}'

RAPPER_IMAGE: docker.io/pheyvaer/raptor
RAPPER_DOCKER: docker run {{.DOCKER_PARAMS}} {{.DOCKER_DIRS}} {{.RAPPER_IMAGE}}
RAPPER_CMD: '{{.RAPPER_DOCKER}}'


tasks:

default:
summary: List all tasks
silent: true
cmds:
- task --list

ci:
desc: Build tasks for the CI
cmds:
- task: check

check:
desc: Test that the serialization is still valid
cmds:
- "{{ .RAPPER_CMD }} -i rdfxml -c ./elementSet/dnb.rdf"
- "{{ .RAPPER_CMD }} -i rdfxml -c ./elementSet/agrelon.rdf"
- "{{ .RAPPER_CMD }} -i rdfxml -c ./valueVocabulary/description-level.rdf"
- "{{ .RAPPER_CMD }} -i rdfxml -c ./valueVocabulary/gender.rdf"
- "{{ .RAPPER_CMD }} -i rdfxml -c ./valueVocabulary/gnd-sc.rdf"
- "{{ .RAPPER_CMD }} -i rdfxml -c ./valueVocabulary/type-of-coordinates.rdf"
- "{{ .RAPPER_CMD }} -i rdfxml -c ./valueVocabulary/geographic-area-code.rdf"