@@ -140,23 +140,40 @@ jobs:
140140 run : cmake --preset ${{matrix.preset}}
141141
142142 - name : CMake Build
143- run : cmake --build --preset ${{matrix.preset}}
143+ run : cmake --build --preset ${{matrix.preset}}
144144
145- # - name: CMake Test
146- # id: cmake-test
147- # run: ctest --test-dir ./out/build/${{matrix.preset}}/OdbDesignTests --output-log ${{github.workspace}}/testlog.txt --output-junit ${{github.workspace}}/testlog.xml -V
148- # # let the report step fail the job if it finds failed tests
149- # continue-on-error: true
145+ - name : Checkout OdbDesign Test Data Repository
146+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
147+ with :
148+ repository : ' nam20485/OdbDesignTestData'
149+ path : ' OdbDesignTestData'
150+ ref : ' main'
151+ token : ${{ secrets.ODBDESIGN_TESTDATA_ACCESS_TOKEN }}
152+
153+ - name : Export ODB_TEST_DATA_DIR
154+ uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
155+ with :
156+ script : core.exportVariable('ODB_TEST_DATA_DIR', "${{github.workspace}}/OdbDesignTestData/TEST_DATA" || '');
150157
151- # # report test results
152- # - name: Report Test Results
153- 154- # if: ${{steps.cmake-test.outcome}} == 'success' || ${{steps.cmake-test.outcome}} == 'failure'
155- # with:
156- # name: ${{ matrix.os }}_test-results
157- # path: ${{github.workspace}}/testlog.xml
158- # reporter: java-junit
159- # fail-on-error: true
158+ - name : CMake Test
159+ id : cmake-test
160+ env :
161+ ODB_TEST_DATA_DIR : ${{github.workspace}}/OdbDesignTestData/TEST_DATA
162+ run : ctest --test-dir ./out/build/${{matrix.preset}}/OdbDesignTests --output-log ${{github.workspace}}/testlog.txt --output-junit ${{github.workspace}}/testlog.xml --output-on-failure
163+ # let the report step fail the job if it finds failed tests...
164+ continue-on-error : true
165+
166+ # report test results
167+ - name : Report Test Results
168+ 169+ if : steps.cmake-test.outcome == 'success' || steps.cmake-test.outcome == 'failure'
170+ with :
171+ name : ${{ matrix.os }}_test-results
172+ path : ${{github.workspace}}/testlog.xml
173+ reporter : java-junit
174+ path-replace-backslashes : true
175+ # fail job based on report results
176+ fail-on-error : true
160177
161178 #
162179 # Artifacts
0 commit comments