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 cached conda environment for CI #351

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

jfrost-mo
Copy link
Member

@jfrost-mo jfrost-mo commented Jan 9, 2024

Fixes #342, and significantly speeds up the tests.

Note

Currently an editable install is used for running the tests. This is undesirable, as it can cause tests to pass when they otherwise wouldn't, but fixing it will have to be done after #337 is merged, as that contains tweaks in that area. This work is tracked separately in #356.

@jfrost-mo jfrost-mo added the cleanup Non-functional improvement label Jan 9, 2024
@jfrost-mo jfrost-mo self-assigned this Jan 9, 2024
Copy link
Contributor

github-actions bot commented Jan 9, 2024

Coverage

@jfrost-mo jfrost-mo force-pushed the 342_directly_use_conda_in_actions branch 6 times, most recently from 6ddbac9 to d213d72 Compare January 12, 2024 15:57
@jfrost-mo jfrost-mo force-pushed the 342_directly_use_conda_in_actions branch from d213d72 to fc891f4 Compare January 12, 2024 15:57
This removes a layer of abstraction, and should also
speed up the runtime of the CI checks.

Fixes #342.

* Use cached conda environment for building docs
* List out conda env location
* Install module before documenting
* Try fixing CONDA not being in env context
* Directly use conda environment for tests
* Install package before testing
* Use explicit prefix for conda env

This should avoid permission issues when restoring the cache, and
also means we no longer need to rely on $CONDA.

* Skip conda install if cache restored
* Fail fast on partial cache match
@jfrost-mo jfrost-mo force-pushed the 342_directly_use_conda_in_actions branch from fc891f4 to e75683b Compare January 12, 2024 16:08
@jfrost-mo jfrost-mo marked this pull request as ready for review January 12, 2024 16:29
@jfrost-mo jfrost-mo requested a review from a team January 12, 2024 16:31
@jfrost-mo jfrost-mo added the github_actions Pull requests that update GitHub Actions code label Jan 12, 2024
Copy link
Contributor

@jwarner8 jwarner8 left a comment

Choose a reason for hiding this comment

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

looks sensible, few minor comments/thoughts added

.github/workflows/pull_request_checks.yml Show resolved Hide resolved
@jfrost-mo jfrost-mo merged commit 9e4bb95 into main Jan 15, 2024
8 checks passed
@jfrost-mo jfrost-mo deleted the 342_directly_use_conda_in_actions branch January 15, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Non-functional improvement github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Directly use conda environment in Actions workflows
2 participants