Update shared test action to remove deprecated cache v2 usage#41
Merged
Conversation
Agent-Logs-Url: https://github.com/DevExpress/testcafe-build-system/sessions/f096cc17-ab2b-4ab9-8f8b-71ca3870c0a3 Co-authored-by: aleks-pro <14822473+aleks-pro@users.noreply.github.com>
Agent-Logs-Url: https://github.com/DevExpress/testcafe-build-system/sessions/f096cc17-ab2b-4ab9-8f8b-71ca3870c0a3 Co-authored-by: aleks-pro <14822473+aleks-pro@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix deprecated GitHub Actions cache usage in shared build-system actions
Update shared test action to remove deprecated cache v2 usage
May 12, 2026
aleks-pro
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Downstream workflows consuming
DevExpress/testcafe-build-systemwere failing at job setup becauseactions/cache@v2is now hard-failed by GitHub. This PR updates the shared action path used by downstream repos to restore workflow startup compatibility.Scope
actions/test-npm/action.yml(the only location in this repo usingactions/cache@v2).Cache action migration
actions/cache@v2→actions/cache@v4path,key,restore-keys) to preserve current cache behavior.Related workflow command deprecation cleanup
set-outputusage with$GITHUB_OUTPUTin the same composite action step to align with current Actions runtime behavior.Original prompt
Fix the deprecated GitHub Actions cache usage in the shared build-system actions used by downstream repositories.
Context:
DevExpress/testcafe-browser-provider-browserstackfailed before tests started.This request has been automatically failed because it uses a deprecated version of actions/cache: v2. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions.DevExpress/testcafe-build-system/actions/prepare@mainDevExpress/testcafe-build-system/actions/build@mainDevExpress/testcafe-build-system/actions/test-npm@mainTask:
actions/cache@v2in reusable actions/workflows, especially underactions/prepare,actions/build, andactions/test-npm.actions/cache@v2references to a supported version, preferablyactions/cache@v4.Goal:
Restore compatibility with GitHub Actions by removing deprecated cache action usage so downstream repos can run CI successfully again.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is in the workflow setup, not in the test code.
Root cause
The job was auto-failed because one of the reused actions in the workflow still depends on a deprecated
actions/cache@v2:The failing job is defined in
.github/workflows/test.yml, and both jobs use shared DevExpress actions:DevExpress/testcafe-build-system/actions/prepare@mainat lines 14 and 23DevExpress/testcafe-build-system/actions/build@mainat line 16DevExpress/testcafe-build-system/actions/test-npm@mainat line 25Because the error happens before your repo’s own test commands run, the fix is to update the shared action(s) so they no longer use
actions/cache@v2.Fix
Update the referenced composite/reusable actions in
DevExpress/testcafe-build-systemfrom:to either:
or:
v4is the better choice.What to change
In the external action repo, look for
actions/cache@v2inside:actions/prepareactions/buildactions/test-npmand replace it with
actions/cache@v4.Example:
Recommended repo-side change
Your workflow currently tracks
@main, which means this repo can break whenever the shared action changes. In.github/workflows/test.yml, pin the shared actions to a commit or release tag after the cache fix is merged.Example:
and
Why this is the right fix
package-lock.jsonis not the source of the error.So the solution is: update the shared GitHub Action(s) to use
actions/cache@v3or@v4, then pin this workflow to the fixed revision instead of@main.User: Can you create a PR in testcafe-build-system repo to fix this issue?
Assistant: I’ve started the PR creation workflow in
DevExpress/testcafe-build-system; once it finishes, I’ll share the PR link and summary.This pull request was created from Copilot chat.