File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change
1
+ include : ' /.gitlab/ci/platform-test.yml'
2
+
1
3
stages :
2
4
- Platform Tests
3
5
- Quality Checks
@@ -27,6 +29,18 @@ Code Climate:
27
29
reports :
28
30
codequality : gl-code-quality-report.json
29
31
32
+ Code Coverage :
33
+ extends : .platform-test
34
+ stage : Quality Checks
35
+ allow_failure : false
36
+ image : swift:latest
37
+ rules :
38
+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
39
+ changes :
40
+ - ' *.swift'
41
+ script : scripts/generate_code_coverage.sh
42
+ coverage : ' /TOTAL.*(\s\d+\.\d+%)/'
43
+
30
44
.standard-platform-test :
31
45
rules :
32
46
- if : $CI_PIPELINE_SOURCE == "push"
Original file line number Diff line number Diff line change 9
9
</p >
10
10
11
11
<p >
12
- <a href="https://gitlab.com/Mordil/RediStack/pipelines"><img src="https://gitlab.com/Mordil/RediStack/badges/master/pipeline.svg" alt="Build Status"></a>
12
+ <a href="https://gitlab.com/Mordil/RediStack/-/commits/master"><img alt="pipeline status" src="https://gitlab.com/Mordil/RediStack/badges/master/pipeline.svg" /></a>
13
+ <a href="https://gitlab.com/Mordil/RediStack/-/commits/master"><img alt="coverage report" src="https://gitlab.com/Mordil/RediStack/badges/master/coverage.svg"/></a>
13
14
<a href="https://swiftpackageindex.com/Mordil/RediStack/master/documentation/redistack"><img src="https://img.shields.io/badge/SPI-Documentation-blue.svg" alt="Documentation Coverage"></a>
14
15
<a href="https://codeclimate.com/github/Mordil/RediStack/maintainability"><img src="https://api.codeclimate.com/v1/badges/b6fd5e7a3e669165a21b/maintainability" /></a>
15
16
</p >
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # #===----------------------------------------------------------------------===##
4
+ # #
5
+ # # This source file is part of the RediStack open source project
6
+ # #
7
+ # # Copyright (c) 2022 RediStack project authors
8
+ # # Licensed under Apache License v2.0
9
+ # #
10
+ # # See LICENSE.txt for license information
11
+ # # See CONTRIBUTORS.txt for the list of RediStack project authors
12
+ # #
13
+ # # SPDX-License-Identifier: Apache-2.0
14
+ # #
15
+ # #===----------------------------------------------------------------------===##
16
+
17
+ swift test --enable-code-coverage --enable-test-discovery
18
+
19
+ BUILD_BIN_PATH=$( swift build --show-bin-path)
20
+ CODE_COV_PATH=$( swift test --show-codecov-path)
21
+
22
+ PROF_DATA_PATH=" ${CODE_COV_PATH%/* } /default.profdata"
23
+ TEST_BINARY_PATH=" ${BUILD_BIN_PATH} /RediStackPackageTests.xctest"
24
+
25
+ IGNORE_FILENAME_REGEX=" (\.build|TestUtils|Tests)"
26
+
27
+ llvm-cov report \
28
+ $TEST_BINARY_PATH \
29
+ --format=text \
30
+ --instr-profile=" $PROF_DATA_PATH " \
31
+ --ignore-filename-regex=" $IGNORE_FILENAME_REGEX "
You can’t perform that action at this time.
0 commit comments