Skip to content

Commit

Permalink
Merge pull request #28 from 417-72KI/linux-testable
Browse files Browse the repository at this point in the history
Make testable in Linux
  • Loading branch information
YusukeHosonuma authored Mar 13, 2020
2 parents d84280f + 8cba8ba commit 201f107
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 6 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ jobs:
- name: Run Unit Test
run: make test

unit-test-in-linux:
runs-on: ubuntu-latest
container: swift:5.1

steps:
- uses: actions/checkout@v2

- name: Run Unit Test
run: make test

integration-test:
runs-on: macos-latest

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ let package = Package(
dependencies: [],
targets: [
.target(name: "SwiftParamTest", dependencies: [], path: "Sources"),
.testTarget(name: "SwiftParamTestTests", dependencies: ["SwiftParamTest"], path: "Tests"),
.testTarget(name: "SwiftParamTestTests", dependencies: ["SwiftParamTest"]),
]
)
14 changes: 11 additions & 3 deletions SwiftParamTest.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
4BC02A72241B4B9900540911 /* SwiftParamTestTests */ = {
isa = PBXGroup;
children = (
E5A3854C241A41DD006501FA /* DSL */,
OBJ_11 /* XCTestManifests.swift */,
E5A38545241A3F20006501FA /* Function.swift */,
);
path = SwiftParamTestTests;
sourceTree = "<group>";
};
E5A0684A2407B00700FF06E4 /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -120,9 +130,7 @@
OBJ_10 /* Tests */ = {
isa = PBXGroup;
children = (
E5A3854C241A41DD006501FA /* DSL */,
OBJ_11 /* XCTestManifests.swift */,
E5A38545241A3F20006501FA /* Function.swift */,
4BC02A72241B4B9900540911 /* SwiftParamTestTests */,
);
path = Tests;
sourceTree = SOURCE_ROOT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,12 @@ class BasicDSLTests: XCTestCase {
])
}
}

extension BasicDSLTests {
static var allTests : [(String, (BasicDSLTests) -> () throws -> Void)] {
[
("testExample", testExample),
("testCustomAssertion", testCustomAssertion)
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,12 @@ class DSLTests: XCTestCase {
}
}
}

extension DSLTests {
static var allTests : [(String, (DSLTests) -> () throws -> Void)] {
[
("testExample", testExample),
("testCustomAssertion", testCustomAssertion)
]
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import XCTest

#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(SwiftParamTestTests.allTests),
[
testCase(DSLTests.allTests),
testCase(BasicDSLTests.allTests)
]
}
#endif

0 comments on commit 201f107

Please sign in to comment.