Skip to content

Implement a cache for integration test#649

Merged
sebsto merged 20 commits intomainfrom
sebsto/simplify-ci
Feb 24, 2026
Merged

Implement a cache for integration test#649
sebsto merged 20 commits intomainfrom
sebsto/simplify-ci

Conversation

@sebsto
Copy link
Collaborator

@sebsto sebsto commented Feb 24, 2026

This PR divides the CI time by ~2

Issue

N/A

Description of changes

This PR makes two changes to the integration tests workflow:

  1. Replace the manual git clone checkout with actions/checkout@v4 in the test-examples job. The container image was updated from Amazon Linux 2 to swift:6.2 (Ubuntu-based), which supports Node.js-based GitHub Actions. This also removes the now-unnecessary working-directory overrides that pointed to the repository subdirectory created by the manual clone.

  2. Add SPM dependency caching (actions/cache@v4) to the test-examples, test-archive-plugin, and check-foundation jobs. Each example's .build directory is cached with a key scoped per example name, avoiding cross-contamination between different dependency sets.

New/existing dependencies impact assessment, if applicable

No new dependencies were added to this change. This only adds the actions/cache@v4 GitHub Action to the CI workflow.

Conventional Commits

ci: switch to actions/checkout and add SPM dependency caching in integration tests

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sebsto sebsto added the semver/none No version bump required. label Feb 24, 2026
@sebsto sebsto self-assigned this Feb 24, 2026
@sebsto sebsto requested a review from Copilot February 24, 2026 08:36
Copy link
Contributor

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

This PR aims to add SPM (Swift Package Manager) dependency caching to integration test workflows to improve CI performance. However, the changes include several other significant modifications beyond caching: replacing manual git clone with actions/checkout@v4, changing the default Swift container image from Amazon Linux 2 to Ubuntu-based, and adding manual workflow triggering capability.

Changes:

  • Added workflow_dispatch trigger to pull_request.yml for manual workflow execution
  • Changed default Swift container image from swift:6.2-amazonlinux2 to swift:6.2 in integration tests
  • Replaced manual git clone with actions/checkout@v4 in the test-examples job
  • Added SPM dependency caching using actions/cache@v4 to both test-examples and test-archive-plugin jobs

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/pull_request.yml Added workflow_dispatch trigger to enable manual workflow execution
.github/workflows/integration_tests.yml Changed container image default, replaced manual checkout with actions/checkout@v4, and added SPM caching to integration test jobs
Comments suppressed due to low confidence (3)

.github/workflows/integration_tests.yml:88

  • The working directory is set to ${{ github.event.repository.name }} (lines 83 and 88), which assumes the old manual checkout method that placed the repository in a subdirectory. However, actions/checkout@v4 (line 70) checks out code directly to GITHUB_WORKSPACE, not to a subdirectory. This means the subsequent steps will fail because they're trying to cd into a directory that doesn't exist.

These working-directory settings should be removed since the code is now checked out directly to the workspace root.

      - name: Mark the workspace as safe
        working-directory: ${{ github.event.repository.name }}  # until we can use action/checkout@v4
        # https://github.com/actions/checkout/issues/766
        run: git config --global --add safe.directory ${GITHUB_WORKSPACE}

      - name: Run matrix job
        working-directory: ${{ github.event.repository.name }}  # until we can use action/checkout@v4

.github/workflows/pull_request.yml:6

  • The PR description doesn't mention adding workflow_dispatch trigger to the pull_request workflow. While this change allows manual triggering of the workflow (which can be useful for testing), it should be documented in the PR description as it changes the workflow's triggering behavior.
  workflow_dispatch:

.github/workflows/integration_tests.yml:72

  • Inconsistent indentation: this line uses 4 spaces of indentation (12 total spaces) while the equivalent line 108 in the test-archive-plugin job uses 2 spaces (10 total spaces). For consistency with the rest of the file, this should use 2 spaces of indentation.
          persist-credentials: false

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sebsto sebsto requested a review from 0xTim February 24, 2026 10:12
@sebsto sebsto enabled auto-merge (squash) February 24, 2026 10:13
Copy link
Collaborator

@0xTim 0xTim left a comment

Choose a reason for hiding this comment

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

Looks good - we should consider bumping the dependencies however

sebsto and others added 4 commits February 24, 2026 18:42
Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
Co-authored-by: Tim Condon <0xTim@users.noreply.github.com>
@sebsto sebsto disabled auto-merge February 24, 2026 17:55
@sebsto sebsto merged commit 1df89fd into main Feb 24, 2026
50 checks passed
@sebsto sebsto deleted the sebsto/simplify-ci branch February 24, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants