Skip to content

Commit 4de34ce

Browse files
authored
workflows: Run unit tests using GitHub Actions (#200)
* workflows: Re-enable tests job * workflows: Disable tests on Windows Requires NIO support on Windows * workflows: Disable end-to-end tests in GitHub Actions There is a good chance that GitHub Actions will be able to run these tests, but we will disable them for now in order to get the unit tests running. The end-to-end tests could not run with swift-ci, so disabling them here does not reduce CI coverage.
1 parent 5fee508 commit 4de34ce

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/pull_request.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ on:
55
types: [opened, reopened, synchronize]
66

77
jobs:
8-
# tests:
9-
# name: Test
10-
# uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
11-
# with:
12-
# linux_pre_build_command: apt-get update && apt-get install -y locales locales-all libsqlite3-dev
8+
tests:
9+
name: Test
10+
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
11+
with:
12+
linux_pre_build_command: apt-get update && apt-get install -y locales locales-all libsqlite3-dev
13+
enable_windows_checks: false
1314
soundness:
1415
name: Soundness
1516
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main

Tests/SwiftSDKGeneratorTests/EndToEndTests.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ final class RepeatedBuildTests: XCTestCase {
121121
private let logger = Logger(label: "swift-sdk-generator")
122122

123123
func testRepeatedSDKBuilds() async throws {
124-
if ProcessInfo.processInfo.environment.keys.contains("JENKINS_URL") {
124+
if ProcessInfo.processInfo.environment.keys.contains("JENKINS_URL")
125+
|| ProcessInfo.processInfo.environment.keys.contains("GITHUB_ACTIONS")
126+
{
125127
throw XCTSkip(
126128
"EndToEnd tests cannot currently run in CI: https://github.com/swiftlang/swift-sdk-generator/issues/145"
127129
)
@@ -296,7 +298,9 @@ func buildTestcases(config: SDKConfiguration) async throws {
296298
var logger = Logger(label: "EndToEndTests")
297299
logger[metadataKey: "testcase"] = "testPackageInitExecutable"
298300

299-
if ProcessInfo.processInfo.environment.keys.contains("JENKINS_URL") {
301+
if ProcessInfo.processInfo.environment.keys.contains("JENKINS_URL")
302+
|| ProcessInfo.processInfo.environment.keys.contains("GITHUB_ACTIONS")
303+
{
300304
throw XCTSkip(
301305
"EndToEnd tests cannot currently run in CI: https://github.com/swiftlang/swift-sdk-generator/issues/145"
302306
)

0 commit comments

Comments
 (0)