Añadido sistema de validación SHACL local, herramientas Docker y ejem… #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate SHACL and RDF Examples | |
| on: | |
| pull_request: | |
| paths: | |
| - 'shacl/**/*.ttl' | |
| - 'examples/**/*.rdf' | |
| - 'examples/**/*.ttl' | |
| - '.github/workflows/validate-shacl.yml' | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| paths: | |
| - 'shacl/**/*.ttl' | |
| - 'examples/**/*.rdf' | |
| - 'examples/**/*.ttl' | |
| jobs: | |
| validate-dcat-ap-es: | |
| name: Validación DCAT-AP-ES (Todas las Fases) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run DCAT-AP-ES Validation | |
| id: validate | |
| continue-on-error: true | |
| run: | | |
| chmod +x tests/validate-local.sh | |
| ./tests/validate-local.sh all | |
| echo "exit_code=$?" >> $GITHUB_OUTPUT | |
| - name: Upload validation reports | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dcat-ap-es-validation-reports | |
| path: tests/validation-reports/ | |
| retention-days: 30 | |
| - name: Comment PR with results | |
| if: github.event_name == 'pull_request' && always() | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const summary = fs.readFileSync('tests/validation-reports/SUMMARY.md', 'utf8'); | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: summary | |
| }); | |
| - name: Check validation result | |
| run: | | |
| EXIT_CODE="${{ steps.validate.outputs.exit_code }}" | |
| if [ "$EXIT_CODE" != "0" ]; then | |
| echo "❌ Validación fallida con código de salida: $EXIT_CODE" | |
| exit 1 | |
| fi | |
| echo "✅ Validación completa exitosa" |