Skip to content

Commit 7edbcaf

Browse files
authored
Android support (#1352)
1 parent 1df6e3d commit 7edbcaf

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,8 @@ jobs:
9595
action: test
9696
enable-code-coverage: true
9797
- uses: codecov/codecov-action@v1
98+
test-android:
99+
runs-on: ubuntu-latest
100+
steps:
101+
- uses: actions/checkout@v4
102+
- uses: skiptools/swift-android-action@v2

Tests/A+/XCTestManifests.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#if !canImport(ObjectiveC)
22
import XCTest
33

4+
#if os(Linux) || os(Android)
5+
extension XCTestExpectation {
6+
func fulfill() {
7+
fulfill(#file, line: #line)
8+
}
9+
}
10+
#endif
11+
412
extension Test212 {
513
// DO NOT MODIFY: This is autogenerated, use:
614
// `swift test --generate-linuxmain`

Tests/CorePromise/LoggingTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
@testable import PromiseKit
22
import Dispatch
33
import XCTest
4+
#if canImport(Android)
5+
import Android
6+
#endif
47

58
class LoggingTests: XCTestCase {
69
/**

Tests/CorePromise/Utilities.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ extension Promise {
44
func silenceWarning() {}
55
}
66

7-
#if os(Linux)
7+
#if os(Linux) || os(Android)
88
import func CoreFoundation._CFIsMainThread
99

1010
extension Thread {

0 commit comments

Comments
 (0)