File tree Expand file tree Collapse file tree 3 files changed +48
-8
lines changed Expand file tree Collapse file tree 3 files changed +48
-8
lines changed Original file line number Diff line number Diff line change 1414 with :
1515 workflow_id : ${{ github.event.workflow.id }}
1616
17+ generate_code_coverage :
18+ needs : cancel_previous
19+ runs-on : macos-14
20+ steps :
21+ - uses : maxim-lobanov/setup-xcode@v1
22+ with :
23+ xcode-version : " 15.2"
24+ - uses : actions/checkout@v2
25+ - uses : webfactory/ssh-agent@v0.8.0
26+ with :
27+ ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
28+ - name : Build & Run tests
29+ run : swift test --enable-code-coverage
30+ - name : Convert coverage report
31+ run : xcrun llvm-cov export -format="lcov" .build/debug/SegmentPackageTests.xctest/Contents/MacOS/SegmentPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
32+ - name : Upload coverage reports to Codecov
33+ uses : codecov/codecov-action@v4.0.1
34+ with :
35+ token : ${{ secrets.CODECOV_TOKEN }}
36+ slug : segmentio/analytics-swift
37+
1738 build_and_test_spm_mac :
1839 needs : cancel_previous
1940 runs-on : macos-14
2546 - uses : webfactory/ssh-agent@v0.8.0
2647 with :
2748 ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
28- - name : Build
29- run : swift build
30- - name : Run tests
49+ - name : Build & Run tests
3150 run : swift test
3251
3352 build_and_test_spm_linux :
4261 - uses : webfactory/ssh-agent@v0.8.0
4362 with :
4463 ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
45- - name : Build
46- run : swift build
47- - name : Run tests
64+ - name : Build & Run tests
4865 run : swift test --enable-test-discovery
4966
5067 build_and_test_spm_windows :
Original file line number Diff line number Diff line change @@ -60,13 +60,13 @@ public class Analytics {
6060 /// - Parameters:
6161 /// - configuration: The configuration to use
6262 public init ( configuration: Configuration ) {
63- if Self . isActiveWriteKey ( configuration. values. writeKey) {
63+ /* if Self.isActiveWriteKey(configuration.values.writeKey) {
6464 // If you're hitting this in testing, it could be a memory leak, or something async is still running
6565 // and holding a reference. You can use XCTest.waitUntilFinished(...) to wait for things to complete.
6666 fatalError("Cannot initialize multiple instances of Analytics with the same write key")
6767 } else {
6868 Self.addActiveWriteKey(configuration.values.writeKey)
69- }
69+ }*/
7070
7171 store = Store ( )
7272 storage = Storage (
Original file line number Diff line number Diff line change 1+ ignore :
2+ - " Tests" # ignore all tests
3+
4+ coverage :
5+ status :
6+ project :
7+ default :
8+ target : 50%
9+ threshold : 5%
10+ informational : false
11+ patch :
12+ default :
13+ target : 80%
14+ informational : false
15+
16+ comment :
17+ layout : " diff, flags, files"
18+ behavior : default
19+ require_changes : false # learn more in the Requiring Changes section below
20+ require_base : false # [true :: must have a base report to post]
21+ require_head : true # [true :: must have a head report to post]
22+ hide_project_coverage : false # [true :: only show coverage on the git diff]
23+
You can’t perform that action at this time.
0 commit comments