File tree 3 files changed +53
-27
lines changed
3 files changed +53
-27
lines changed Original file line number Diff line number Diff line change 5
5
- Sources/**
6
6
- Tests/**
7
7
- .github/workflows/ci.yml
8
+ schedule :
9
+ - cron : ' 3 3 * * 4' # 3:03 AM, every Thursday
8
10
jobs :
9
- auto-cancel :
10
- runs-on : ubuntu-latest
11
- steps :
12
- - uses : technote-space/auto-cancel-redundant-job@v1
13
11
macOS :
14
- needs : auto-cancel
15
12
runs-on : macos-latest
16
13
steps :
14
+ - uses : technote-space/auto-cancel-redundant-job@v1
17
15
- uses : actions/checkout@v2
18
- - run : swift package generate-xcodeproj --enable-code-coverage
19
- - uses : sersoft-gmbh/xcodebuild-action@v1
20
- with :
21
- project : Version.xcodeproj
22
- scheme : Version-Package
23
- action : test
24
- - uses : codecov/codecov-action@v1
16
+ - run : swift test
17
+
25
18
linux :
26
- needs : auto-cancel
27
- runs-on : ubuntu-18.04
19
+ runs-on : ubuntu-latest
28
20
strategy :
29
21
matrix :
30
22
swift :
31
- - ' 4.2'
32
- - ' 5.0'
33
- - ' 5.1'
34
- - ' 5.2'
35
- - ' 5.3'
36
- - ' 5.4'
23
+ - ' 4.2'
24
+ - ' 5.0'
25
+ - ' 5.1'
26
+ - ' 5.2'
27
+ - ' 5.3'
37
28
container :
38
29
image : swift:${{ matrix.swift }}
39
30
steps :
40
31
- uses : actions/checkout@v2
41
32
- run : swift build
33
+
34
+ code-coverage :
35
+ runs-on : ubuntu-latest
36
+ name : linux (5.4)
37
+ container :
38
+ image : swift:5.4
39
+ continue-on-error : true # continuous-resilience
40
+ steps :
41
+ - uses : actions/checkout@v2
42
+ - run : swift test --enable-code-coverage
43
+ - run : |
44
+ apt-get -qq update
45
+ apt-get -qq install curl
46
+ # ^^ for codecov’s action 🙄
47
+ - run : |
48
+ b="$(swift build --show-bin-path)"
49
+ llvm-cov export \
50
+ -format lcov \
51
+ -instr-profile="$b/codecov/default.profdata" \
52
+ --ignore-filename-regex='\.build|Tests' \
53
+ "$b"/*.xctest \
54
+ > info.lcov
55
+ - uses : codecov/codecov-action@v1
56
+ with :
57
+ file : ./info.lcov
Original file line number Diff line number Diff line change @@ -11,10 +11,3 @@ let pkg = Package(
11
11
] ,
12
12
swiftLanguageVersions: [ . v4, . v4_2, . version( " 5 " ) ]
13
13
)
14
-
15
- #if !os(Linux)
16
- // testing on Linux not necessary since we have no platform specific code
17
- // thus if there are any issues, they are Swift bugs
18
- // would support it if Linux testing wasn‘t a PITA
19
- pkg. targets. append ( . testTarget( name: " Tests.Version.mxcl " , dependencies: [ " Version " ] , path: " Tests " ) )
20
- #endif
Original file line number Diff line number Diff line change
1
+ // swift-tools-version:5.3
2
+ import PackageDescription
3
+
4
+ let pkg = Package (
5
+ name: " Version " ,
6
+ products: [
7
+ . library( name: " Version " , targets: [ " Version " ] ) ,
8
+ ] ,
9
+ targets: [
10
+ . target( name: " Version " , path: " Sources " ) ,
11
+ ] ,
12
+ swiftLanguageVersions: [ . v4, . v4_2, . v5]
13
+ )
14
+
15
+ #if swift(>=5.4) || os(macOS)
16
+ pkg. targets. append ( . testTarget( name: " Tests.Version.mxcl " , dependencies: [ " Version " ] , path: " Tests " ) )
17
+ #endif
You can’t perform that action at this time.
0 commit comments