Skip to content

Commit

Permalink
Add a basic github action and Taskfile to verify that the rdf files a…
Browse files Browse the repository at this point in the history
…re parsable
  • Loading branch information
white-gecko committed Aug 5, 2024
1 parent c17be27 commit 43a5399
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
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"

0 comments on commit 43a5399

Please sign in to comment.