correction du fichier de test #7
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: Validation RNG | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name : Récupérer le dépôt | |
| uses: actions/checkout@v5 | |
| - name: Installer Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Télécharger Jing | |
| run: | | |
| curl -L -o jing.zip https://github.com/relaxng/jing-trang/releases/download/V20220510/jing-20220510.zip | |
| unzip jing.zip | |
| - name: Vérifier jing | |
| run: | | |
| ls | |
| ls jing-20220510 | |
| ls jing-20220510/bin | |
| - name: Vérifier l’arborescence | |
| run: | | |
| ls -R | |
| - name: Valider les fichiers XML de test | |
| run: | | |
| shopt -s nullglob | |
| files=(tei/glossaire/test/*.xml) | |
| if [ ${#files[@]} -eq 0 ]; then | |
| echo "Aucun fichier XML trouvé dans tei/glossaire/test/" | |
| exit 1 | |
| fi | |
| for file in "${files[@]}"; do | |
| echo "Validation de $file" | |
| java -jar jing-20220510/bin/jing.jar schemas/glossaire-tei.rng "$file" | |
| done | |
| - name: Notification Discord | |
| if: always() | |
| run: | | |
| curl -H "Content-Type: application/json" \ | |
| -d "{ | |
| \"content\": \"Validation RNG : ${{ job.status }} − ${{ github.repository }} − branche ${{ github.ref_name }}\" | |
| }" \ | |
| ${{ secrets.DISCORD_WEBHOOK_URL }}" |