File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 run : swift build -v
2727 - name : Test with coverage
2828 run : swift test --enable-code-coverage -v
29- - name : Coverage path
29+ - name : Export LCOV
3030 id : coverage
31- run : echo "path=$(swift test --show-codecov-path)" >> "$GITHUB_OUTPUT"
31+ run : |
32+ COVERAGE_PATH="$(swift test --show-codecov-path)"
33+ CODECOV_DIR="$(dirname "$COVERAGE_PATH")"
34+ BIN_PATH="$(swift build --show-bin-path)"
35+ TEST_BINARY="$BIN_PATH/SwiftNEWPackageTests.xctest/Contents/MacOS/SwiftNEWPackageTests"
36+
37+ xcrun llvm-cov export "$TEST_BINARY" \
38+ -instr-profile "$CODECOV_DIR/default.profdata" \
39+ -format=lcov \
40+ -ignore-filename-regex='/.build/|/Tests/' \
41+ | sed "s#SF:$PWD/#SF:#" > coverage.lcov
42+
43+ echo "path=coverage.lcov" >> "$GITHUB_OUTPUT"
3244 - name : Upload coverage to Codecov
3345 uses : codecov/codecov-action@v6
3446 with :
Original file line number Diff line number Diff line change 55![ Stable] ( https://img.shields.io/github/v/release/1998code/SwiftNEWKit?color=03A791&label=Stable )
66![ Beta] ( https://img.shields.io/github/v/release/1998code/SwiftNEWKit?include_prereleases&color=3A59D1&label=Beta )
77[ ![ Validate JSON Files] ( https://github.com/1998code/SwiftNEWKit/actions/workflows/validate-json.yml/badge.svg )] ( https://github.com/1998code/SwiftNEWKit/actions/workflows/validate-json.yml )
8+ [ ![ codecov] ( https://codecov.io/github/1998code/SwiftNEWKit/branch/main/graph/badge.svg?token=GI0KRUHVH1 )] ( https://codecov.io/github/1998code/SwiftNEWKit )
89![ Swift Version] ( https://img.shields.io/badge/Swift-5.9/6.1-teal.svg )
910![ Platforms] ( https://img.shields.io/badge/Platforms-iOS%2015.0+%20|%20macOS%2014.0+%20|%20tvOS%2017.0+%20|%20visionOS%201.0+-15437D.svg )
1011![ License] ( https://img.shields.io/badge/License-MIT-C8ECFE.svg )
You can’t perform that action at this time.
0 commit comments