Skip to content

Commit 94a7d6e

Browse files
authored
Create vectorcast-testing.yml
1 parent aabb488 commit 94a7d6e

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/test.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#
2+
# The MIT License
3+
#
4+
# Copyright 2024 Vector Informatik, GmbH.
5+
#
6+
# Permission is hereby granted, free of charge, to any person obtaining a copy
7+
# of this software and associated documentation files (the "Software"), to deal
8+
# in the Software without restriction, including without limitation the rights
9+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
# copies of the Software, and to permit persons to whom the Software is
11+
# furnished to do so, subject to the following conditions:
12+
#
13+
# The above copyright notice and this permission notice shall be included in
14+
# all copies or substantial portions of the Software.
15+
#
16+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
# THE SOFTWARE.
23+
#
24+
25+
name: GitHub Action for VectorCAST
26+
27+
on:
28+
push:
29+
branches: [ "master" ]
30+
pull_request:
31+
types: [opened, synchronize, reopened]
32+
33+
env:
34+
# Relative path from checkout to the VectorCAST Project
35+
VC_Manage_Project="Project"
36+
37+
# Use "--jobs=##" to use parallel number of jobs per compiler node; otherwise, for serial build/execute set to "" or "--jobs=1"
38+
VC_Job_Count="--jobs=4"
39+
40+
# Use "--incremental" to use VecteorCAST Change Based Testing; otherwise, set to ""
41+
VC_useCBT="--incremental"
42+
43+
# Use CI licenses for VectorCAST Continuous Integration (headless) licenses
44+
# set to 1 to use CI licenses and 0 to not user CI License
45+
VCAST_USE_CI_LICENSES=0
46+
47+
# maybe left over from gitlab integration
48+
CI_PROJECT_DIR: ${{ github.workspace }}
49+
50+
jobs:
51+
build:
52+
53+
runs-on: self-hosted
54+
55+
steps:
56+
- uses: actions/checkout@v3
57+
58+
# Use for only generating Junit and Cobertura metrics
59+
- name: VectorCAST Generate Metrics
60+
run: ${VECTORCAST_DIR}/vpython vc_scripts/vcast_actions.py ${VC_Manage_Project} --build-execute --junit --cobertura --exit_with_failed_count=10 ${VC_Job_Count} ${VC_useCBT}
61+
62+
# Cobertura reporting
63+
- name: Publish Cobertura Report
64+
uses: 5monkeys/cobertura-action@master
65+
with:
66+
path: '**/xml_data/cobertura/coverage_results*.xml'
67+
minimum_coverage: 0
68+
69+
# Junit reporting
70+
- name: Publish Test Report
71+
uses: mikepenz/action-junit-report@v3
72+
if: success() || failure() # always run even if the previous step fails
73+
with:
74+
report_paths: '**/xml_data/junit/test_results*.xml'
75+
detailed_summary: true
76+
fail_on_failure: true
77+
include_passed: true
78+
79+

0 commit comments

Comments
 (0)