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

Check alternatives to GitHub actions and pages #19

Open
acka47 opened this issue Feb 5, 2024 · 10 comments
Open

Check alternatives to GitHub actions and pages #19

acka47 opened this issue Feb 5, 2024 · 10 comments
Assignees
Labels
question Further information is requested

Comments

@acka47
Copy link
Member

acka47 commented Feb 5, 2024

As usual, there are several options:

  • Set up a similar process for gitlab.com and maybe others.
  • Think about running the build process on hbz servers.
  • evaluate git hooks
  • ...

We should aim at making this as forge-agnostic as possible

@acka47 acka47 added the question Further information is requested label Feb 5, 2024
@acka47 acka47 added this to SkoHub Feb 5, 2024
@github-project-automation github-project-automation bot moved this to Backlog in SkoHub Feb 5, 2024
@acka47 acka47 moved this from Backlog to Ready in SkoHub Feb 5, 2024
@naturzukunft
Copy link

Gitlab Sample

Output

@naturzukunft
Copy link

I currently have trouble with the links!

solved, the problem was the missing inScheme

@acka47
Copy link
Member Author

acka47 commented Apr 16, 2024

solved, the problem was the missing inScheme

You might add an automatic validation step in your workflow, @naturzukunft, to be notified about things that will hinder a proper SkoHub build. The documentation for adding it in GitHub Actions is here: https://github.com/skohub-io/shapes?tab=-ov-file#add-validation-in-a-vocabulary-repository

@naturzukunft
Copy link

@acka47 are we talking about a jena docker image by "Check with Docker"
Do you maybe have a more detailed sample ?

@naturzukunft
Copy link

Check with Docker"

Ah, I found it in this terrible script ;-)
https://hub.docker.com/r/skohub/jena

Did I already say that I am not a script person :-)

@naturzukunft
Copy link

In general, it would be helpful to move the script parts into files so that they can be reused more easily.

@sroertgen
Copy link
Contributor

In general, it would be helpful to move the script parts into files so that they can be reused more easily.

I don't really get what you mean. Can you please elaborate with what you mean to move the script parts into files?

Here is the general idea:

How to use the shape with your vocabs. There are multiple ways:

To have all vocabularies in a github repository checked we wrote a bash script that we use in the CI pipeline. It's just a composition of the docker approach run for every .ttl file:

curl -s https://raw.githubusercontent.com/skohub-io/shapes/main/scripts/checkForWarning.rq >> checkForWarning.rq
find . -type f -name '*.ttl' | while read file; do
  # Adjust the file path to remove the './' part
  adjusted_file_path=$(echo "$file" | sed 's|^./||')
  echo "Processing $adjusted_file_path with Docker..."
  docker run --rm -v "$(pwd)/$adjusted_file_path:/rdf/test.ttl" skohub/jena:4.6.1 shacl validate --shapes https://raw.githubusercontent.com/skohub-io/shapes/main/skohub.shacl.ttl --data /rdf/test.ttl >> result.ttl
  validation_result="$(docker run --rm --mount type=bind,source=./checkForWarning.rq,target=/rdf/checkForViolation.rq --mount type=bind,source=./result.ttl,target=/rdf/result.ttl skohub/jena:4.6.1 arq --data /rdf/result.ttl --query /rdf/checkForViolation.rq)"
  echo $validation_result
  lines=$(echo "$validation_result" | wc -l )
  # Correct validation has 4 lines of output
  [[ ${lines} -eq 4 ]] || exit 1
done

@naturzukunft
Copy link

naturzukunft commented Apr 16, 2024

To have all vocabularies in a github repository checked we wrote a bash script that we use in the CI pipeline. It's just a composition of the docker approach run for every .ttl file:

And if this batch script is in it's own file, you can also use it from gitlab ci !
Currently it's in a github action, if i understand that right.

However, i've added the validation now in my build.sh that i use locally.

Info: i moved the gitlab project!

@sroertgen
Copy link
Contributor

Alright. Got it. Will do so, when coming to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Ready
Development

No branches or pull requests

3 participants