Skip to content

Commit

Permalink
Merge pull request #2 from tbartelmess/github-action
Browse files Browse the repository at this point in the history
Added GitHub action to run tests
  • Loading branch information
tbartelmess authored Oct 4, 2020
2 parents 60cba4b + dcc8185 commit 4d541c6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
- uses: actions/checkout@v2
with:
submodules: true
- name: Show Swift Version
run: swift --version
- name: Build
run: swift build
- name: Test
run: swift test
17 changes: 14 additions & 3 deletions Tests/CRC32CTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import XCTest

import Swift_CRC32Tests
import CRC32CTests

var tests = [XCTestCaseEntry]()
tests += Swift_CRC32Tests.allTests()
tests += CRC32CTests.__allTests()

XCTMain(tests)

0 comments on commit 4d541c6

Please sign in to comment.