Conversation
There was a problem hiding this comment.
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_dispatchtrigger topull_request.ymlfor manual workflow execution - Changed default Swift container image from
swift:6.2-amazonlinux2toswift:6.2in integration tests - Replaced manual git clone with
actions/checkout@v4in thetest-examplesjob - Added SPM dependency caching using
actions/cache@v4to bothtest-examplesandtest-archive-pluginjobs
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 toGITHUB_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_dispatchtrigger 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.
0xTim
left a comment
There was a problem hiding this comment.
Looks good - we should consider bumping the dependencies however
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>
This PR divides the CI time by ~2
Issue
N/A
Description of changes
This PR makes two changes to the integration tests workflow:
Replace the manual
git clonecheckout withactions/checkout@v4in thetest-examplesjob. The container image was updated from Amazon Linux 2 toswift:6.2(Ubuntu-based), which supports Node.js-based GitHub Actions. This also removes the now-unnecessaryworking-directoryoverrides that pointed to the repository subdirectory created by the manual clone.Add SPM dependency caching (
actions/cache@v4) to thetest-examples,test-archive-plugin, andcheck-foundationjobs. Each example's.builddirectory 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@v4GitHub Action to the CI workflow.Conventional Commits
ci: switch to actions/checkout and add SPM dependency caching in integration testsBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.