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

Add caching to tests #39

Merged
merged 11 commits into from
Jul 24, 2024
Merged

Add caching to tests #39

merged 11 commits into from
Jul 24, 2024

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Jul 23, 2024

This PR sets up caching for setting up JANUS and SOCRATES. This completely eliminates build times on repeated runs with the same SOCRATES or JANUS versions. This should reduce total test times by ~1.5 minutes for each run.

The caches are keyed by the python version and pyproject.toml for JANUS and to SOCRATES/version for SOCRATES.

I also scoped the test runs, so that they no longer run twice in a PR.

Closes #37

TODO

  • Cache FWL_DATA directory
  • Use absolute path for FWL_DATA

@stefsmeets stefsmeets marked this pull request as ready for review July 23, 2024 08:39
@stefsmeets stefsmeets requested a review from lsoucasse July 23, 2024 08:48
@stefsmeets stefsmeets marked this pull request as draft July 23, 2024 14:21
@stefsmeets
Copy link
Contributor Author

This PR is ready to be reviewed.

@stefsmeets stefsmeets marked this pull request as ready for review July 24, 2024 10:00
@timlichtenberg
Copy link
Member

I am happy to review it, since Laurent is on holiday this week. So if you are ok with this, I will go ahead.

@timlichtenberg timlichtenberg self-requested a review July 24, 2024 10:33
Copy link
Member

@timlichtenberg timlichtenberg left a comment

Choose a reason for hiding this comment

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

Seems good to me, before merging we may want to quickly discuss this with Laurent early next week when he's back; up to you.

@stefsmeets stefsmeets merged commit 8bed2b6 into master Jul 24, 2024
3 checks passed
@stefsmeets stefsmeets deleted the test-caching branch July 24, 2024 12:22
@stefsmeets
Copy link
Contributor Author

Cheers, I'll just merge it now then. If there need to be additional changes, I'm happy to fix it!

lsoucasse pushed a commit that referenced this pull request Sep 24, 2024
* Avoid running the same tests twice in a PR

* Cache python venv install

* Set up cache for socrates

* Move apt install back to the top

* Fix path and cache key

* Pull to local directory

* Fix path to version file

* Trigger workflow

* Add caching for FWL_DATA directory

* Expand path
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.

Add caching to tests
2 participants