Skip to content

Commit

Permalink
Add syntax validator gh action
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Klímek <[email protected]>
  • Loading branch information
jakubklimek committed Feb 23, 2024
1 parent b0db7b7 commit 9c51b85
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validator2

on:
push:
pull_request:
branches:
- master
- develop
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Data validator
uses: datagov-cz/data-validator/github@master
with:
configuration: file://./.github/workflows/validate-syntax.ttl
30 changes: 30 additions & 0 deletions .github/workflows/validate-syntax.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@prefix dash: <http://datashapes.org/dash#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# Configuration for syntax validation.
<http://localhost/configuration> a <urn:DataValidatorConfiguration> ;
<urn:rule> [
<urn:pattern> ".*.jsonld" ;
<urn:validator>
[ a <urn:TitaniumJsonLdSyntax> ; ]
], [
<urn:pattern> ".*.json", ".*.jsonld" ;
<urn:validator>
[ a <urn:JacksonJsonSyntax> ; ]
], [
<urn:pattern> ".*.ttl", ".*.trig", ".*.nq", ".*.nt", ".*.rdf" ;
<urn:validator>
[ a <urn:JenaRdfSyntax> ; ]
], [
<urn:pattern> ".*.xml" ;
<urn:validator>
[ a <urn:Dom4jXmlSyntax> ; ]
] ;
<urn:recursive> true ;
# Can be changed from the command line.
<urn:path> "./" ;
.

0 comments on commit 9c51b85

Please sign in to comment.