Skip to content

Commit 6ef9dfa

Browse files
committed
Actions: Use Matrix and Xcode 11.4
1 parent 5ecde09 commit 6ef9dfa

File tree

2 files changed

+31
-37
lines changed

2 files changed

+31
-37
lines changed

.github/workflows/tests.yml

Lines changed: 30 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,43 @@ name: CombineExt
33
on: [push, pull_request]
44

55
jobs:
6-
macOS:
7-
name: "macOS"
6+
xcode-tests:
7+
name: "Test"
88
runs-on: macOS-latest
9+
10+
strategy:
11+
matrix:
12+
platform: [macOS, iOS, tvOS]
13+
include:
14+
- platform: macOS
15+
sdk: macosx
16+
destination: "arch=x86_64"
917

10-
steps:
11-
- uses: actions/checkout@v2
12-
- name: Run tests
13-
run: set -o pipefail && xcodebuild -project CombineExt.xcodeproj -scheme CombineExt-Package -enableCodeCoverage YES -sdk macosx -destination "arch=x86_64" test | xcpretty -c -r html --output logs/macOS.html
14-
- uses: actions/upload-artifact@v1
15-
with:
16-
name: build-logs-${{ github.run_id }}
17-
path: logs
18+
- platform: iOS
19+
sdk: iphonesimulator
20+
destination: "name=iPhone 11"
1821

19-
iOS:
20-
name: "iOS"
21-
runs-on: macOS-latest
22+
- platform: tvOS
23+
sdk: appletvsimulator
24+
destination: "name=Apple TV"
2225

2326
steps:
24-
- uses: actions/checkout@v2
25-
- name: Run tests
26-
run: set -o pipefail && xcodebuild -project CombineExt.xcodeproj -scheme CombineExt-Package -enableCodeCoverage YES -sdk iphonesimulator -destination "name=iPhone 11" test | xcpretty -c -r html --output logs/iOS.html
27-
- uses: codecov/[email protected]
28-
with:
29-
token: 1519d58c-6fb9-483f-af6c-7f6f0b384345
30-
name: CombineExt
31-
- uses: actions/upload-artifact@v1
32-
with:
33-
name: build-logs-${{ github.run_id }}
34-
path: logs
35-
tvOS:
36-
name: "tvOS"
37-
runs-on: macOS-latest
27+
- uses: actions/checkout@v2
28+
- name: Select Xcode 11.4
29+
run: sudo xcode-select -s /Applications/Xcode_11.4.app
30+
- name: Run tests
31+
run: set -o pipefail && xcodebuild -project CombineExt.xcodeproj -scheme CombineExt-Package -enableCodeCoverage YES -sdk ${{ matrix.sdk }} -destination "${{ matrix.destination }}" test | xcpretty -c -r html --output logs/${{ matrix.platform }}.html
32+
- uses: codecov/[email protected]
33+
with:
34+
token: 1519d58c-6fb9-483f-af6c-7f6f0b384345
35+
name: CombineExt
36+
- uses: actions/upload-artifact@v1
37+
with:
38+
name: build-logs-${{ github.run_id }}
39+
path: logs
3840

39-
steps:
40-
- uses: actions/checkout@v2
41-
- name: Run tests
42-
run: set -o pipefail && xcodebuild -project CombineExt.xcodeproj -scheme CombineExt-Package -enableCodeCoverage YES -sdk appletvsimulator -destination "name=Apple TV" test | xcpretty -c -r html --output logs/tvOS.html
43-
- uses: actions/upload-artifact@v1
44-
with:
45-
name: build-logs-${{ github.run_id }}
46-
path: logs
4741
SPM:
48-
name: "SPM"
42+
name: "Test (SPM)"
4943
runs-on: macOS-latest
5044

5145
steps:

Tests/FlatMapLatestTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class FlatMapLatestTests: XCTestCase {
5757

5858
// There is a known bug in Xcode 11.3 and below where an inner
5959
// completion doesn't complete the outer publisher, so this test
60-
// will only work after Xcode 11.4.
60+
// will only work after Xcode 11.4 and iOS/tvOS 13.4 or macOS 10.15.4.
6161
// See: https://forums.swift.org/t/confused-about-behaviour-of-switchtolatest-in-combine/29914/24
6262
// XCTAssertTrue(completed)
6363
_ = completed

0 commit comments

Comments
 (0)