ci: upgrade outdated actions and cache deps in PR Checks (master)#5150
Conversation
- Upgrade actions/checkout v3 → v4 in both check_docs and test_go - Upgrade actions/setup-go v3 → v5 with cache-dependency-path: v2/go.sum (enables Go module and build cache, was missing previously) - Replace bare apt-get update/install with awalsh128/cache-apt-pkgs-action for ubuntu-22.04 and ubuntu-24.04 (saves ~30s per Linux job on cache hit, consistent with how v3 workflows handle Linux deps) The test_go condition and trigger types were already correct on master. Companion to #5149 which makes equivalent changes on the v3-alpha branch.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe GitHub Actions workflow file was updated to use newer action versions and improved dependency management. Action versions were bumped ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the PR Checks (master) GitHub Actions workflow on master to use newer core actions and enable dependency caching, aiming to reduce CI runtime and improve reliability for PR validation.
Changes:
- Upgraded
actions/checkoutfromv3tov4in both jobs. - Upgraded
actions/setup-gofromv3tov5and enabled Go caching viacache-dependency-path: v2/go.sum. - Replaced raw
apt-getinstalls withawalsh128/cache-apt-pkgs-actionfor cached Linux package installation on Ubuntu 22.04/24.04.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Install linux dependencies (22.04) | ||
| uses: awalsh128/cache-apt-pkgs-action@latest | ||
| if: matrix.os == 'ubuntu-22.04' | ||
| run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config | ||
| with: | ||
| packages: libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config | ||
| version: 1.0 |
There was a problem hiding this comment.
awalsh128/cache-apt-pkgs-action is referenced via the mutable @latest tag. This can introduce supply-chain risk and make CI non-deterministic if the action changes or is re-published. Prefer pinning to an immutable ref (a release tag like @v1 if maintained, or a commit SHA) and bump intentionally when upgrading.
| if: matrix.os == 'ubuntu-24.04' | ||
| run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config | ||
| with: | ||
| packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config |
There was a problem hiding this comment.
The Ubuntu 24.04 dependency list here differs from the v2 build-and-test.yml workflow (which also installs libegl1 on 24.04). This drift can lead to PR checks passing while the main build workflow fails (or vice versa). Consider aligning the package list between the workflows, or add a short note explaining why pr-master.yml intentionally installs a different set.
| packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config | |
| packages: libgtk-3-dev libwebkit2gtk-4.1-dev libegl1 build-essential pkg-config |
Summary
Companion to #5149 (which targets
v3-alpha). That PR coversbuild-and-test-v3.ymland the copy ofpr-master.ymlonv3-alpha. This PR applies the remaining improvements topr-master.ymlonmaster, where the file actually runs (GitHub Actions uses the workflow from the base branch of a PR).1 file changed, 12 insertions, 5 deletions.
Changes
actions/checkout@v3→@v4check_docsandtest_gojobsactions/setup-go@v3→@v5withcache-dependency-path: v2/go.sumapt-get update && apt-get install→awalsh128/cache-apt-pkgs-actionNotes
test_gocondition (runs on allpull_requestevents, not just approvals) was already correct onmaster— not changed hereRelated
Summary by CodeRabbit