From e78ea378bd71838899ab95d8b40f3cd32173b4c7 Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Thu, 4 Jul 2024 14:45:07 +0200 Subject: [PATCH] Add clerk XML reports to Github --- .github/workflows/harness.yml | 23 ++++++++++++++++++++++- Makefile | 1 + 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/harness.yml b/.github/workflows/harness.yml index b359d9c1..e3ffa4eb 100644 --- a/.github/workflows/harness.yml +++ b/.github/workflows/harness.yml @@ -93,7 +93,18 @@ jobs: git diff --exit-code - name: Run tests if: ${{ always() }} - run: cd /home/ocaml/catala && opam exec -- make tests + run: cd /home/ocaml/catala && opam exec -- make testsuite + - name: Generate test report + if: ${{ always() }} + run: | + cd /home/ocaml/catala + opam exec -- clerk report --xml _build/*@test _build/test-*/*@test >report.junit.xml + - name: Test Summary + uses: test-summary/action@v2 + with: + paths: /home/ocaml/catala/report.junit.xml + if: ${{ always() }} + examples: name: Build examples and generate artifacts @@ -130,6 +141,16 @@ jobs: run: | cd ~/catala-examples opam --cli=2.1 exec -- make all testsuite install + - name: Generate examples test report + if: ${{ always() }} + run: | + cd ~/catala-examples + opam exec -- clerk report --xml _build/*@test _build/test-*/*@test >report.junit.xml + - name: Test Summary + uses: test-summary/action@v2 + with: + paths: /home/ocaml/catala-examples/report.junit.xml + if: ${{ always() }} - name: Checkout french-law repo run: | git clone https://github.com/CatalaLang/french-law --depth 1 ~/french-law -b "${{ github.head_ref || github.ref_name }}" || diff --git a/Makefile b/Makefile index ea06ac9b..7e777d80 100644 --- a/Makefile +++ b/Makefile @@ -229,6 +229,7 @@ testsuite-base: .FORCE #> testsuite : Run interpreter tests over a selection of configurations testsuite: unit-tests + $(CLERK_TEST) doc $(MAKE) testsuite-base #> reset-tests : Update the expected test results from current run