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

Cache python install in github actions #482

Merged
merged 5 commits into from
Mar 1, 2023
Merged

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Feb 21, 2023

This PR caches the python environment. This will significantly reduce the time it will take to run the tests on github actions.

All steps should run roughly 2-3x faster now. I also made it so that the tests only run when the PR is ready for review. This helps save cpu cycles, and saving cpu cycles is good for the environment 🌱

Closes #475

@stefsmeets stefsmeets changed the title Cache python install Cache python install in github actions Feb 21, 2023
@stefsmeets stefsmeets marked this pull request as ready for review February 21, 2023 15:33
@stefsmeets
Copy link
Contributor Author

Hi @cwmeijer Could you have a look at this PR?

Copy link
Contributor

@cwmeijer cwmeijer left a comment

Choose a reason for hiding this comment

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

Great idea and great improvement 🍀
I have some questions in the comments. Could you please check the location of 'types' within the yaml? If you are sure it's fine as it is, it would be great if you could explain it to me :-)
Thanks for the PR!

- opened
- reopened
- synchronize
- ready_for_review
pull_request:
branches:
- main
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't worked a lot with filters and trigger types etc but this doesn't look how I'd expect it to.
To me this reads like:
We run the workflow if anything is pushed to main, and I'm not sure how to interpret these triggers in this case.
We also run the workflow on PRs when their base is main (using the default triggers as nothing is specified under this).

In other words, shouldn't the types element and it's children be under pull_request instead of under push?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, good point, I will fix this later today 👍

@stefsmeets stefsmeets merged commit e9b02ae into main Mar 1, 2023
@stefsmeets stefsmeets deleted the cache_python_install branch March 1, 2023 15:00
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.

Caching for github actions
2 participants