Skip to content

Commit

Permalink
provide results to download on failure
Browse files Browse the repository at this point in the history
Search assert check, require in results file and echo if it appears
  • Loading branch information
bruno-at-orange committed Mar 18, 2024
1 parent dc7fa1b commit 832d64e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,31 @@ jobs:
run: |
build/${{ matrix.build-setup.cmake-preset }}/bin/KNITest \
--gtest_output="xml:reports/report-kni.xml"
- name: Check assertions
if: success() || failure()
run: |
if (grep -E -r "Assert failed in file|Require failed in file|Ensure failed in file|Check failed in file" \
test/KNITest/results/ \
test/Norm/results/ \
test/Learning/results/ \
test/Norm/results/ \
test/Parallel/results/ \
test/Parallel-mpi/results/); then
echo "::error::Test binary fails with assert (or check, require, ensure..). Check results in download"
fi
- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: unit-tests-results-${{ matrix.build-setup.os }}
retention-days: 7
path: |-
test/KNITest/results/
test/Norm/results/
test/Learning/results/
test/Norm/results/
test/Parallel/results/
test/Parallel-mpi/results/
- name: Create Unit Test Reports Dashboards
uses: phoenix-actions/test-reporting@v12
if: success() || failure()
Expand Down
2 changes: 2 additions & 0 deletions test/Learning/Learning_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace
{
// Tests de learning, regroupes par librairie

KHIOPS_TEST(KWDataPreparation, KWProbabilityTable, KWProbabilityTable::Test);

// Librairie KWData
KHIOPS_TEST(KWData, KWClass, KWClass::Test);
KHIOPS_TEST(KWData, KWClassDomain, KWClassDomain::Test);
Expand Down

0 comments on commit 832d64e

Please sign in to comment.