From e27733400d5a992ab33e18765b1f007aa04cea96 Mon Sep 17 00:00:00 2001 From: Thomas Bartelmess Date: Sat, 3 Oct 2020 20:24:36 -0400 Subject: [PATCH 1/2] Added GitHub action to run tests --- .github/workflows/linux.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/linux.yaml diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml new file mode 100644 index 0000000..aeedd9f --- /dev/null +++ b/.github/workflows/linux.yaml @@ -0,0 +1,22 @@ +name: "Run Tests on Linux" + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: fwal/setup-swift@v1.3.0 + - uses: actions/checkout@v2 + with: + submodules: true + - name: Show Swift Version + run: swift --version + - name: Build + run: swift build + - name: Test + run: swift test From dcc818538fa11375272563aa35732c3d829ec2f1 Mon Sep 17 00:00:00 2001 From: Thomas Bartelmess Date: Sat, 3 Oct 2020 20:28:13 -0400 Subject: [PATCH 2/2] Updated linux test manifests --- Tests/CRC32CTests/XCTestManifests.swift | 17 ++++++++++++++--- Tests/LinuxMain.swift | 5 +++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Tests/CRC32CTests/XCTestManifests.swift b/Tests/CRC32CTests/XCTestManifests.swift index 0ab3731..a62d471 100644 --- a/Tests/CRC32CTests/XCTestManifests.swift +++ b/Tests/CRC32CTests/XCTestManifests.swift @@ -1,9 +1,20 @@ +#if !canImport(ObjectiveC) import XCTest -#if !canImport(ObjectiveC) -public func allTests() -> [XCTestCaseEntry] { +extension Swift_CRC32Tests { + // DO NOT MODIFY: This is autogenerated, use: + // `swift test --generate-linuxmain` + // to regenerate. + static let __allTests__Swift_CRC32Tests = [ + ("test192BitValue", test192BitValue), + ("testSimpleData", testSimpleData), + ("testSimpleNumbersCRC32", testSimpleNumbersCRC32), + ] +} + +public func __allTests() -> [XCTestCaseEntry] { return [ - testCase(Swift_CRC32Tests.allTests), + testCase(Swift_CRC32Tests.__allTests__Swift_CRC32Tests), ] } #endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 5d4556d..604c2f5 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1,7 +1,8 @@ import XCTest -import Swift_CRC32Tests +import CRC32CTests var tests = [XCTestCaseEntry]() -tests += Swift_CRC32Tests.allTests() +tests += CRC32CTests.__allTests() + XCTMain(tests)