From 02630bbdf1d2d25c9d3c9153c2dd04550b73d9ad Mon Sep 17 00:00:00 2001 From: Euan Harris Date: Thu, 3 Oct 2024 10:30:28 +0100 Subject: [PATCH] ci: Enable a subset of the unit tests The smoke tests need a registry as a test fixture. We don't yet have that but until we do we can still run the other tests. This will ensure that the code builds and some of the functionality is exercised for each pull request. --- .github/workflows/pull_request.yml | 10 ++++++++++ Tests/ContainerRegistryTests/ImageReferenceTests.swift | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3e67f2f..15059dc 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -14,6 +14,16 @@ jobs: license_header_check_project_name: "SwiftContainerPlugin" shell_check_container_image: "swift:6.0-noble" + unit-tests: + name: Unit tests + uses: apple/swift-nio/.github/workflows/unit_tests.yml@main + with: + linux_5_8_enabled: false + linux_5_9_enabled: false + linux_5_10_enabled: false + linux_nightly_6_0_arguments_override: "--filter 'AuthTests|ReferenceTests'" + linux_nightly_main_arguments_override: "--filter 'AuthTests|ReferenceTests'" + swift-6-language-mode: name: Swift 6 Language Mode uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main diff --git a/Tests/ContainerRegistryTests/ImageReferenceTests.swift b/Tests/ContainerRegistryTests/ImageReferenceTests.swift index c9a3ddf..2b3421a 100644 --- a/Tests/ContainerRegistryTests/ImageReferenceTests.swift +++ b/Tests/ContainerRegistryTests/ImageReferenceTests.swift @@ -27,7 +27,7 @@ struct ReferenceTestCase { } class ReferenceTests: XCTestCase { - var tests = [ + let tests = [ // A reference which does not contain a '/' is always interpreted as a repository name // in the default registry. ReferenceTestCase(