Skip to content

Conversation

@harryswift01
Copy link
Member

Summary

This PR updates the CI workflow to significantly speed up environment setup and test execution.
The pipeline now uses Mamba instead of Conda, caches Conda packages between runs, and simplifies test execution.
It also adds pytest as a dependency in environment.yaml for consistency between local and CI environments.


Changes

Change 1: Switch to Mamba and enable caching

  • Updated the workflow to use use-mamba: true for faster dependency solving.
  • Added a caching step for ~/.conda/pkgs to reuse Conda packages between runs.
  • Renamed “Set up Miniconda” to “Set up Mambaforge” for clarity.

Change 2: Simplify test execution

  • Removed redundant installation of pytest and pytest-cov from the workflow.
  • Replaced the coverage command with pytest -v for quicker test runs.

Change 3: Update environment configuration

  • Added pytest=8.4.2 to environment.yaml to include testing dependencies directly in the environment.

Impact

  • CI builds are now significantly faster.
  • Simplified workflow maintenance with fewer steps and dependencies.

- Replaced conda with mamba in GitHub Actions for faster dependency resolution
- Added caching of conda packages to reduce CI setup time
- Simplified test execution to use pytest -v
- Added pytest as a dependency in environment.yaml to avoid extra installs
@harryswift01 harryswift01 self-assigned this Nov 5, 2025
@harryswift01 harryswift01 added the enhancement New feature or request label Nov 5, 2025
@harryswift01 harryswift01 linked an issue Nov 5, 2025 that may be closed by this pull request
@harryswift01 harryswift01 changed the title ci: switch to mamba and add caching for faster CI builds: Speed up CI by switching to Mamba and adding caching Nov 5, 2025
@Rob-Welch Rob-Welch merged commit 8bbea02 into main Nov 5, 2025
3 checks passed
@Rob-Welch
Copy link
Contributor

It's weird that mamba isn't used by default within github CI, given that it is used when you install locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slow Running CI Pipeline

3 participants