From 43a5399a1096c00eba23dc26d4c17f41e3d2facc Mon Sep 17 00:00:00 2001 From: Natanael Arndt Date: Mon, 5 Aug 2024 16:13:33 +0200 Subject: [PATCH] Add a basic github action and Taskfile to verify that the rdf files are parsable --- .github/workflows/main.yaml | 17 +++++++++++++++ Taskfile.yaml | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/workflows/main.yaml create mode 100644 Taskfile.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..8520924 --- /dev/null +++ b/.github/workflows/main.yaml @@ -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 diff --git a/Taskfile.yaml b/Taskfile.yaml new file mode 100644 index 0000000..91c18b0 --- /dev/null +++ b/Taskfile.yaml @@ -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"