Skip to content

Cache the AVD in CI before executing any tests #1091

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

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

RBusarow
Copy link
Contributor

background: https://workflow-community.slack.com/archives/CHTFPR277/p1689193974005269

I was using actions/cache@v3 to restore and possibly save the AVD in instrumented test shards.

That basic "cache" action handles both reading and writing to the cache. The writing is done during a post-action, meaning that if the AVD was cached, it was cached after it had been used for the instrumented tests.

Now, we use the newer actions/cache/restore@v3 and actions/cache/save@v3 actions, like we use elsewhere. Now, if there was a cache miss and we have to make a new AVD, it is cached before the tests are executed so that it doesn't have any of our test apps installed.

background: https://workflow-community.slack.com/archives/CHTFPR277/p1689193974005269

I was using `actions/cache@v3` to restore and possibly save the AVD in instrumented test shards.

That basic "cache" action handles both reading and writing to the cache.  The writing is done during a post-action, meaning that if the AVD was cached, it was cached *after* it had been used for the instrumented tests.

Now, we use the newer `actions/cache/restore@v3` and `actions/cache/save@v3` actions, like we use elsewhere.  Now, if there was a cache miss and we have to make a new AVD, it is cached before the tests are executed so that it doesn't have any of our test apps installed.
@RBusarow RBusarow requested review from a team and zach-klippenstein as code owners July 13, 2023 17:30
@rjrjr
Copy link
Contributor

rjrjr commented Jul 13, 2023

Be sure to hide whitespace when reviewing this!

@RBusarow
Copy link
Contributor Author

Be sure to hide whitespace when reviewing this!

Yeah, sorry about that. This is the style set by .editorconfig.

@RBusarow RBusarow merged commit 6697056 into main Jul 13, 2023
@RBusarow RBusarow deleted the rick/save_porcelain_AVD_on_cache_miss branch July 13, 2023 22:28
@rjrjr
Copy link
Contributor

rjrjr commented Jul 14, 2023

Be sure to hide whitespace when reviewing this!

Yeah, sorry about that. This is the style set by .editorconfig.

Well worth it.

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