Skip to content

Add Test target + Support sha256 revisions #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 4, 2025

Conversation

HeEAaD
Copy link
Contributor

@HeEAaD HeEAaD commented Jul 4, 2025

  • Add CiliconTests target to the project file Cilicon.xcodeproj/project.pbxproj
  • Support colons in the OCI URL tag to support SHA256 revisions

Motivation

The revisions of tags of https://github.com/cirruslabs/macos-image-templates/pkgs/container/macos-runner/versions change often. This change makes it possible to pin a septic version in the config file.

Example

source: oci://ghcr.io/cirruslabs/macos-runner:sha256:5e09d110333cc37fdb666e19656fac2695611733a23c0b7e9e98ebdaa6a84264

@Copilot Copilot AI review requested due to automatic review settings July 4, 2025 10:53
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new test target and enhances OCIURL parsing to support tags containing colons (e.g., SHA256 revisions).

  • Introduce CiliconTests target and integrate it into the Xcode project and scheme.
  • Update OCIURL initializer to correctly handle tags with multiple colon-separated components.
  • Supply unit tests covering both standard tags and SHA256-style revisions.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
CiliconTests/OCI/Model/OCIURLTests.swift New tests for OCIURL init and JSON encoding
Cilicon/OCI/Model/OCIURL.swift Changed path.split(separator: ":") logic for tags
Cilicon.xcodeproj/xcshareddata/xcschemes/... Added CiliconTests to scheme testables
Cilicon.xcodeproj/project.pbxproj Added CiliconTests target and related build entries
Comments suppressed due to low confidence (1)

CiliconTests/OCI/Model/OCIURLTests.swift:44

  • [nitpick] Consider adding a test for encoding an OCIURL whose tag contains a colon (e.g., a sha256 revision) to ensure JSON encoding handles that scenario correctly.
    func test_encode() throws {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Dimentar Dimentar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HeEAaD HeEAaD merged commit 66f374b into main Jul 4, 2025
@HeEAaD HeEAaD deleted the feature/support-sha-revisions branch July 4, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants