Skip to content

Commit

Permalink
Use common unit-test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Sep 13, 2024
1 parent 82ab10a commit a9c92c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/unit-test-post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: unit-test-post

on:
workflow_run:
workflows: [ unit-test ]
types: [ completed ]

jobs:
publish-test-results:
# FIXME: use main once merged
uses: ultimaker/cura-workflows/.github/workflows/unit-test-post.yml@CURA-11622_conan_v2
with:
event: ${{ github.event.workflow_run.event }}
conclusion: ${{ github.event.workflow_run.conclusion }}
secrets: inherit
31 changes: 4 additions & 27 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,8 @@ on:
jobs:
testing:
name: Run unit tests
runs-on: ubuntu-latest

steps:
# FIXME: use main once merged
- name: Setup the build environment
uses: ultimaker/cura-workflows/.github/actions/setup-build-environment@CURA-11622_conan_v2
with:
conan_user: ${{ secrets.CONAN_USER }}
conan_password: ${{ secrets.CONAN_PASS }}
install_system_dependencies: true

- name: Install dependencies and build unit test
run: conan build . -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv -c tools.build:skip_test=False

- name: Run Unit Test
id: run-test
run: ctest --output-junit unit_tests_results.xml
working-directory: build/Release/tests

- name: Publish Unit Test Results
id: test-results
uses: EnricoMi/publish-unit-test-result-action@v2
if: ${{ always() }}
with:
files: build/Release/tests/unit_tests_results.xml

- name: Conclusion
run: echo "Conclusion is ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}"
uses: ultimaker/cura-workflows/.github/workflows/unit-test.yml@CURA-11622_conan_v2
with:
test_use_ctest: true
secrets: inherit

0 comments on commit a9c92c3

Please sign in to comment.