-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
37 lines (37 loc) · 1.39 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: RDF syntax check
description: Iterates all RDF files in the repository and validates their syntax. It fails when an invalid file is detected.
author: AtomGraph
branding:
icon: 'check-circle'
color: 'blue'
inputs:
jena-version:
description: 'The Jena version to set up'
required: true
default: 4.7.0
asf-archive:
description: 'The Apache distribution URL'
required: true
default: https://archive.apache.org/dist/
runs:
using: "composite"
steps:
- name: Install Linux packages
run: sudo apt-get update && sudo apt-get install curl
shell: bash
- name: Download Jena
run: curl -sS --fail "${{ inputs.asf-archive }}jena/binaries/apache-jena-${{ inputs.jena-version }}.tar.gz" -o "${{ runner.temp }}/jena.tar.gz"
shell: bash
- name: Unpack Jena
run: tar -zxf jena.tar.gz
shell: bash
working-directory: ${{ runner.temp }}
- run: echo "$JENA_HOME/bin" >> $GITHUB_PATH
shell: bash
env:
JENA_HOME: "${{ runner.temp }}/apache-jena-${{ inputs.jena-version }}"
- name: Checkout code
uses: actions/checkout@v3
- name: Find RDF files and call riot for each of them
run: find . \( -name "*.ttl" -o -name "*.trig" -o -name "*.nt" -o -name "*.nq" -o -name "*.rdf" -o -name "*.trix" -o -name "*.jsonld" \) -type f -print0 | while read -d $'\0' f; do echo "$f"; riot --validate "$f"; done
shell: bash