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

Use Caching in Github Actions Workflow #66

Merged
merged 1 commit into from
Feb 15, 2024
Merged

Conversation

plypaul
Copy link
Contributor

@plypaul plypaul commented May 23, 2023

Description

This PR sets up the caching action in the Github workflow so that installing Python dependencies is faster.

Checklist

@cla-bot cla-bot bot added the cla:yes label May 23, 2023
@plypaul plypaul force-pushed the plypaul--04--cache-python branch 12 times, most recently from df45d22 to 4ea6c01 Compare May 23, 2023 03:13
@plypaul plypaul changed the title Use caching in Github Actions Workflow Use Caching in Github Actions Workflow May 23, 2023
@plypaul plypaul force-pushed the plypaul--04--cache-python branch 2 times, most recently from b8e2422 to 0bc9eec Compare May 23, 2023 03:20
@plypaul plypaul force-pushed the plypaul--04--cache-python branch 4 times, most recently from cfc9929 to 7775f41 Compare January 10, 2024 19:00
@plypaul plypaul marked this pull request as ready for review January 10, 2024 19:03
Copy link
Collaborator

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Looks good to me! Excited to see how much this speeds things up 🚀

Copy link
Collaborator

@tlento tlento left a comment

Choose a reason for hiding this comment

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

I like the caching but in updating our actions to cover Python 3.12 I have clobbered a bunch of your changes here. I've left a comment inline about how to make the conflict resolution a bit simpler.

Comment on lines 8 to 6
pydantic-version:
description: "Version of Pydantic to use for testing"
required: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you set a default of 1.10 on this I think you can revert most of the non-caching updates in this PR, since I've separately consolidated actions into this setup.

Alternatively, we can use this as an annotation defaulted to "none" just to seed the cache key and then only install Pydantic in the calling action where it's required. That'll eliminate nearly all of the action-level changes in this PR. If we go that route we should probably name the key something like installed-pydantic-version or suchlike.

@plypaul
Copy link
Contributor Author

plypaul commented Feb 15, 2024

My delays in merging approved PRs have come to bite me.

@plypaul plypaul force-pushed the plypaul--04--cache-python branch from 7775f41 to f79c8c0 Compare February 15, 2024 21:19
@plypaul
Copy link
Contributor Author

plypaul commented Feb 15, 2024

FYI - this reduces the Python test action from 90-120s -> 30-40s.

@plypaul plypaul merged commit 758adc2 into main Feb 15, 2024
16 checks passed
@plypaul plypaul deleted the plypaul--04--cache-python branch February 15, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants