Skip to content
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

chore(test): fix unit test caching issues #5092

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

binoy14
Copy link
Contributor

@binoy14 binoy14 commented Oct 30, 2023

Description

This PR fixes issues with immature caching behaviors added in #5069 for unit tests in PRs where the first commit build got cached and was not getting cleaned on next commit or re-run of the action. The change now uses the run id and removes the restore_keys to make sure the correct artifact is used across steps. As an extra precaution, there is also a delete job added that will delete cache after the workflow run is completed.

What to review

Changes makes sense

Notes for release

  • N/A (internal)

@vercel
Copy link

vercel bot commented Oct 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Oct 30, 2023 4:36pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2023 4:36pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Oct 30, 2023 4:36pm

@github-actions
Copy link
Contributor

No changes to documentation

@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2023

Component Testing Report Updated Oct 30, 2023 4:41 PM (UTC)

File Status Duration Passed Skipped Failed
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 13s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 11s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 16s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 59s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 7s 3 0 0

- chore(test): add delete cache job after build finishes
- chore(test): use restore cache action in test build to make sure cache
  is immutable in tests
Copy link
Contributor

@jtpetty jtpetty left a comment

Choose a reason for hiding this comment

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

LGTM

@binoy14 binoy14 added this pull request to the merge queue Oct 31, 2023
Merged via the queue into next with commit 829f541 Oct 31, 2023
30 checks passed
@binoy14 binoy14 deleted the chore/fix-test-cache branch October 31, 2023 00:32
skogsmaskin pushed a commit that referenced this pull request Nov 2, 2023
- chore(test): add delete cache job after build finishes
- chore(test): use restore cache action in test build to make sure cache
  is immutable in tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants