File tree 3 files changed +48
-8
lines changed
3 files changed +48
-8
lines changed Original file line number Diff line number Diff line change 14
14
with :
15
15
workflow_id : ${{ github.event.workflow.id }}
16
16
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
+
17
38
build_and_test_spm_mac :
18
39
needs : cancel_previous
19
40
runs-on : macos-14
25
46
- uses : webfactory/ssh-agent@v0.8.0
26
47
with :
27
48
ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
28
- - name : Build
29
- run : swift build
30
- - name : Run tests
49
+ - name : Build & Run tests
31
50
run : swift test
32
51
33
52
build_and_test_spm_linux :
42
61
- uses : webfactory/ssh-agent@v0.8.0
43
62
with :
44
63
ssh-private-key : ${{ secrets.SOVRAN_SSH_KEY }}
45
- - name : Build
46
- run : swift build
47
- - name : Run tests
64
+ - name : Build & Run tests
48
65
run : swift test --enable-test-discovery
49
66
50
67
build_and_test_spm_windows :
Original file line number Diff line number Diff line change @@ -60,13 +60,13 @@ public class Analytics {
60
60
/// - Parameters:
61
61
/// - configuration: The configuration to use
62
62
public init ( configuration: Configuration ) {
63
- if Self . isActiveWriteKey ( configuration. values. writeKey) {
63
+ /* if Self.isActiveWriteKey(configuration.values.writeKey) {
64
64
// If you're hitting this in testing, it could be a memory leak, or something async is still running
65
65
// and holding a reference. You can use XCTest.waitUntilFinished(...) to wait for things to complete.
66
66
fatalError("Cannot initialize multiple instances of Analytics with the same write key")
67
67
} else {
68
68
Self.addActiveWriteKey(configuration.values.writeKey)
69
- }
69
+ }*/
70
70
71
71
store = Store ( )
72
72
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