Skip to content

Commit

Permalink
Make invalid modulix content
Browse files Browse the repository at this point in the history
Co-authored-by: Eric Lim <[email protected]>
Co-authored-by: Diane Cordier <[email protected]>
  • Loading branch information
3 people committed Jan 23, 2025
1 parent 5f9e781 commit 2e633ab
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 50 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/test-modulix-content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,41 @@ jobs:
- name: Install dependencies
run: npm clean-install

- name: Run Modulix Tests
run: npm run modulix:test
- id: tests
name: Run Modulix Tests
run: |
npm run modulix:test 2>&1 | tee test_output.log
echo "TEST_ERRORS<<EOF" >> $GITHUB_ENV
cat test_output.log >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
continue-on-error: true

- name: Comment PR with Test Modulix Error details
if: failure()
uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Les tests Modulix ont échoué. Voici les détails :
\`\`\`
${process.env.TEST_ERRORS}
\`\`\``
})
#
# - uses: mainmatter/continue-on-error-comment@v1
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# outcome: ${{ steps.tests.outcome }}
# test-id: ${{steps.tests.output}}


Original file line number Diff line number Diff line change
Expand Up @@ -258,54 +258,6 @@
"solution": "1"
}
]
},
{
"elements": [
{
"id": "79dc17f9-142b-4e19-bcbe-bfde4e170d3f",
"type": "qcu",
"instruction": "<p>Pix est découpé en 6 domaines.</p>",
"proposals": [
{
"id": "1",
"content": "Vrai"
},
{
"id": "2",
"content": "Faux"
}
],
"feedbacks": {
"valid": "<span class=\"feedback__state\">Correct&#8239;!</span><p> Bien vu !</p>",
"invalid": "<span class=\"feedback__state\">Incorrect.</span><p> Et non ! Il y a seulement 5 domaines sur Pix.</p>"
},
"solution": "2"
}
]
},
{
"elements": [
{
"id": "9c73500d-abd9-4cc4-ab2d-a3876285b13c",
"type": "qcu",
"instruction": "<p>Les compétences de Pix sont sur 8 niveaux.</p>",
"proposals": [
{
"id": "1",
"content": "Vrai"
},
{
"id": "2",
"content": "Faux"
}
],
"feedbacks": {
"valid": "<span class=\"feedback__state\">Correct&#8239;!</span><p> Et oui ! A noter, seulement 7 sont actifs aujourd’hui.</p>",
"invalid": "<span class=\"feedback__state\">Incorrect.</span><p> Incorrect ! Il existe 8 niveaux par compétence.</p>"
},
"solution": "1"
}
]
}
]
}
Expand Down

0 comments on commit 2e633ab

Please sign in to comment.