diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3cca3d3..c07e9d1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -20,14 +20,15 @@ jobs: curl -sL https://raw.githubusercontent.com/apple/swift-mmio/refs/heads/main/.swift-format -o .swift-format-mmio diff .swift-format .swift-format-mmio -# tests: -# name: Test -# uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main -# with: -# macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.0\"}, {\"xcode_version\": \"16.1\"}, {\"xcode_version\": \"16.2\"}, {\"xcode_version\": \"16.3\"}]" -# linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"6.1\"}, {\"swift_version\": \"nightly-main\"}, {\"swift_version\": \"nightly-6.1\"}, {\"swift_version\": \"nightly-6.2\"}]" -# windows_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"6.1\"}, {\"swift_version\": \"nightly\"}, {\"swift_version\": \"nightly-6.1\"}]" -# enable_macos_checks: true + tests: + name: Test + uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main + with: + macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.0\"}, {\"xcode_version\": \"16.1\"}, {\"xcode_version\": \"16.2\"}, {\"xcode_version\": \"16.3\"}]" + linux_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"6.1\"}, {\"swift_version\": \"nightly-main\"}, {\"swift_version\": \"nightly-6.1\"}]" + windows_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"6.1\"}, {\"swift_version\": \"nightly\"}, {\"swift_version\": \"nightly-6.1\"}]" + enable_macos_checks: false + enable_windows_checks: false soundness: name: Soundness diff --git a/.unacceptablelanguageignore b/.unacceptablelanguageignore new file mode 100644 index 0000000..fb9dc39 --- /dev/null +++ b/.unacceptablelanguageignore @@ -0,0 +1 @@ +CODE_OF_CONDUCT.md diff --git a/Tests/ExampleParserTests/TestQOI.swift b/Tests/ExampleParserTests/TestQOI.swift index b67af7e..00bb257 100644 --- a/Tests/ExampleParserTests/TestQOI.swift +++ b/Tests/ExampleParserTests/TestQOI.swift @@ -15,16 +15,18 @@ import Testing #if canImport(AppKit) import AppKit +#else +import Foundation #endif struct QOITests { @Test(arguments: ["tricolor", "antelope"]) func parseImage(fileName: String) throws { let qoi = try #require(Self.getQOIPixels(testFileName: fileName)) - if #available(macOS 10.0, *) { - let png = try #require(Self.getPNGPixels(testFileName: fileName)) - #expect(png == qoi) - } +#if canImport(AppKit) + let png = try #require(Self.getPNGPixels(testFileName: fileName)) + #expect(png == qoi) +#endif } static func getQOIPixels(testFileName: String) -> Data? { @@ -36,7 +38,7 @@ struct QOITests { }.pixels } - @available(macOS 10.0, *) +#if canImport(AppKit) static func getPNGPixels(testFileName: String) -> Data? { guard let imageData = testData(named: "PNG/\(testFileName).png"), let image = NSImage(data: imageData) @@ -53,4 +55,5 @@ struct QOITests { } return nil } +#endif }