Skip to content

Commit 9c52472

Browse files
committed
unit test
1 parent 71d3704 commit 9c52472

File tree

3 files changed

+15
-32
lines changed

3 files changed

+15
-32
lines changed

.github/workflows/collector-builder.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- .github/workflows/collector-builder.yml
4545
4646
build-builder-image:
47-
name: local builder image ${{ matrix.arch }}
47+
name: Local builder image ${{ matrix.arch }}
4848
# Multiarch builds sometimes take for eeeeeeeeeever
4949
timeout-minutes: 480
5050
needs:
@@ -118,7 +118,7 @@ jobs:
118118
ansible/ci-build-builder.yml
119119
120120
build-builder-image-remote:
121-
name: remote builder image ${{ matrix.arch }}
121+
name: Remote builder image ${{ matrix.arch }}
122122
# Multiarch builds sometimes take for eeeeeeeeeever
123123
timeout-minutes: 480
124124
needs:

.github/workflows/collector.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434

3535
jobs:
3636
build-collector-image:
37-
name: Build Collector
37+
name: Local collector image ${{ matrix.arch }}
3838
strategy:
3939
matrix:
4040
arch: [amd64, arm64]
@@ -89,7 +89,7 @@ jobs:
8989
9090
build-collector-image-remote:
9191
if: contains(inputs.include-arch-json, 's390x')
92-
name: Build Collector
92+
name: Remote collector image ${{ matrix.arch }}
9393
strategy:
9494
matrix:
9595
arch: [s390x]

.github/workflows/unit-tests.yml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,32 @@ on:
1313
required: true
1414
description: |
1515
JSON list of {arch,runner,remote} build configurations
16-
cmake-flags-list-json:
17-
type: string
18-
required: false
19-
default: "['-DCMAKE_BUILD_TYPE=Release','-DADDRESS_SANITIZER=ON -DCMAKE_BUILD_TYPE=Debug','-DUSE_VALGRIND=ON -DCMAKE_BUILD_TYPE=Debug']"
20-
description: |
21-
JSON list of cmake flags for unit tests
2216
2317
jobs:
24-
unit-tests-amd64:
25-
if: contains(inputs.include-arch-json, 'amd64')
26-
runs-on: ubuntu-24.04
18+
unit-tests:
2719
container:
2820
image: quay.io/stackrox-io/collector-builder:${{ inputs.collector-builder-tag }}
2921
strategy:
22+
fail-fast: false
3023
matrix:
31-
cmake-flags: ${{ fromJSON(inputs.cmake-flags-list-json) }}
32-
steps:
33-
- uses: actions/checkout@v4
34-
with:
35-
submodules: true
36-
- uses: ./.github/actions/run-unit-tests
37-
with:
38-
cmake-flags: ${{ matrix.cmake-flags }}
24+
arch: [amd64, arm64]
25+
cmake-flags:
26+
- -DCMAKE_BUILD_TYPE=Release
27+
- -DADDRESS_SANITIZER=ON -DCMAKE_BUILD_TYPE=Debug
28+
- -DUSE_VALGRIND=ON -DCMAKE_BUILD_TYPE=Debug
29+
runs-on: ${{ (matrix.arch == 'arm64' && 'ubuntu-22.04-arm') || 'ubuntu-22.04' }}
3930

40-
unit-tests-arm64:
41-
if: contains(inputs.include-arch-json, 'arm64')
42-
runs-on: ubuntu-24.04-arm
43-
container:
44-
image: quay.io/stackrox-io/collector-builder:${{ inputs.collector-builder-tag }}
45-
strategy:
46-
matrix:
47-
cmake-flags: ${{ fromJSON(inputs.cmake-flags-list-json) }}
4831
steps:
4932
- uses: actions/checkout@v4
5033
with:
5134
submodules: true
35+
5236
- uses: ./.github/actions/run-unit-tests
5337
with:
5438
cmake-flags: ${{ matrix.cmake-flags }}
5539

56-
unit-tests-coverage:
57-
if: contains(inputs.include-arch-json, 'arm64')
58-
runs-on: ubuntu-24.04-arm
40+
coverage:
41+
runs-on: ubuntu-24.04
5942
container:
6043
image: quay.io/stackrox-io/collector-builder:${{ inputs.collector-builder-tag }}
6144
steps:

0 commit comments

Comments
 (0)