diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 889d485..b22f795 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/Package.swift b/Package.swift index 4b2f009..32646d4 100644 --- a/Package.swift +++ b/Package.swift @@ -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"]), ] ) diff --git a/SwiftParamTest.xcodeproj/project.pbxproj b/SwiftParamTest.xcodeproj/project.pbxproj index b65c9ca..6530610 100644 --- a/SwiftParamTest.xcodeproj/project.pbxproj +++ b/SwiftParamTest.xcodeproj/project.pbxproj @@ -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 = ""; + }; E5A0684A2407B00700FF06E4 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -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; diff --git a/Tests/DSL/BasicDSLTests.swift b/Tests/SwiftParamTestTests/DSL/BasicDSLTests.swift similarity index 90% rename from Tests/DSL/BasicDSLTests.swift rename to Tests/SwiftParamTestTests/DSL/BasicDSLTests.swift index 952e3ce..1116db2 100644 --- a/Tests/DSL/BasicDSLTests.swift +++ b/Tests/SwiftParamTestTests/DSL/BasicDSLTests.swift @@ -83,3 +83,12 @@ class BasicDSLTests: XCTestCase { ]) } } + +extension BasicDSLTests { + static var allTests : [(String, (BasicDSLTests) -> () throws -> Void)] { + [ + ("testExample", testExample), + ("testCustomAssertion", testCustomAssertion) + ] + } +} diff --git a/Tests/DSL/FunctionBuilderDSLTests.swift b/Tests/SwiftParamTestTests/DSL/FunctionBuilderDSLTests.swift similarity index 90% rename from Tests/DSL/FunctionBuilderDSLTests.swift rename to Tests/SwiftParamTestTests/DSL/FunctionBuilderDSLTests.swift index 46c8cd8..264fa5a 100644 --- a/Tests/DSL/FunctionBuilderDSLTests.swift +++ b/Tests/SwiftParamTestTests/DSL/FunctionBuilderDSLTests.swift @@ -81,3 +81,12 @@ class DSLTests: XCTestCase { } } } + +extension DSLTests { + static var allTests : [(String, (DSLTests) -> () throws -> Void)] { + [ + ("testExample", testExample), + ("testCustomAssertion", testCustomAssertion) + ] + } +} diff --git a/Tests/Function.swift b/Tests/SwiftParamTestTests/Function.swift similarity index 100% rename from Tests/Function.swift rename to Tests/SwiftParamTestTests/Function.swift diff --git a/Tests/XCTestManifests.swift b/Tests/SwiftParamTestTests/XCTestManifests.swift similarity index 55% rename from Tests/XCTestManifests.swift rename to Tests/SwiftParamTestTests/XCTestManifests.swift index e0dddd9..b6a7338 100644 --- a/Tests/XCTestManifests.swift +++ b/Tests/SwiftParamTestTests/XCTestManifests.swift @@ -2,8 +2,9 @@ import XCTest #if !canImport(ObjectiveC) public func allTests() -> [XCTestCaseEntry] { - return [ - testCase(SwiftParamTestTests.allTests), + [ + testCase(DSLTests.allTests), + testCase(BasicDSLTests.allTests) ] } #endif