Skip to content

Commit 4d541c6

Browse files
authored
Merge pull request #2 from tbartelmess/github-action
Added GitHub action to run tests
2 parents 60cba4b + dcc8185 commit 4d541c6

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed

.github/workflows/linux.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Run Tests on Linux"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: fwal/setup-swift@v1.3.0
14+
- uses: actions/checkout@v2
15+
with:
16+
submodules: true
17+
- name: Show Swift Version
18+
run: swift --version
19+
- name: Build
20+
run: swift build
21+
- name: Test
22+
run: swift test
Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
#if !canImport(ObjectiveC)
12
import XCTest
23

3-
#if !canImport(ObjectiveC)
4-
public func allTests() -> [XCTestCaseEntry] {
4+
extension Swift_CRC32Tests {
5+
// DO NOT MODIFY: This is autogenerated, use:
6+
// `swift test --generate-linuxmain`
7+
// to regenerate.
8+
static let __allTests__Swift_CRC32Tests = [
9+
("test192BitValue", test192BitValue),
10+
("testSimpleData", testSimpleData),
11+
("testSimpleNumbersCRC32", testSimpleNumbersCRC32),
12+
]
13+
}
14+
15+
public func __allTests() -> [XCTestCaseEntry] {
516
return [
6-
testCase(Swift_CRC32Tests.allTests),
17+
testCase(Swift_CRC32Tests.__allTests__Swift_CRC32Tests),
718
]
819
}
920
#endif

Tests/LinuxMain.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import XCTest
22

3-
import Swift_CRC32Tests
3+
import CRC32CTests
44

55
var tests = [XCTestCaseEntry]()
6-
tests += Swift_CRC32Tests.allTests()
6+
tests += CRC32CTests.__allTests()
7+
78
XCTMain(tests)

0 commit comments

Comments
 (0)