-
-
Notifications
You must be signed in to change notification settings - Fork 27
86 lines (78 loc) · 2.31 KB
/
unit-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: unit-test
on:
push:
paths:
- 'src/**'
- 'include/**'
- 'test_package/**'
- 'tests/**'
- 'cmake/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/unit-test.yml'
- '.github/workflows/requirements*'
branches:
- main
- master
- 'CURA-*'
- '[0-9].[0-9]*'
- '[0-9].[0-9][0-9]*'
tags:
- '[0-9].[0-9].[0-9]'
- '[0-9].[0-9][0-9].[0-9]'
pull_request:
paths:
- 'src/**'
- 'include/**'
- 'test_package/**'
- 'tests/**'
- 'cmake/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/unit-test.yml'
- '.github/workflows/requirements*'
branches:
- main
- master
- 'CURA-*'
- '[0-9].[0-9]*'
- '[0-9].[0-9][0-9]*'
tags:
- '[0-9].[0-9].[0-9]'
- '[0-9].[0-9][0-9].[0-9]'
jobs:
# FIXME: Use main once merged
conan-recipe-version:
name: Calculate package version numbers
uses: ultimaker/cura-workflows/.github/workflows/conan-recipe-version.yml@CURA-11622_conan_v2
with:
project_name: savitar
secrets: inherit
testing:
name: Run unit tests
runs-on: ubuntu-latest
needs: [ conan-recipe-version ]
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 create . ${{ needs.conan-recipe-version.outputs.recipe_id_full }} -o enable_testing=True -s build_type=Release --build=missing --update -g GitHubActionsRunEnv -g GitHubActionsBuildEnv
- name: Run Unit Test
id: run-test
run: ctest --output-junit engine_test.xml
working-directory: build/Release/
- name: Publish Unit Test Results
id: test-results
uses: EnricoMi/publish-unit-test-result-action@v1
if: ${{ always() }}
with:
files: "**/*.xml"
- name: Conclusion
run: echo "Conclusion is ${{ fromJSON( steps.test-results.outputs.json ).conclusion }}"