Run package tests off CI
Despite having a successful build, sometimes we can't run all the tests we'd like on CI. Some reasons include:
- Specific types of hardware not available
- Tests are too demanding for CI
- Requires non-public credentials
In these cases, it's desirable to run the disabled tests elsewhere, before publishing the package, as part of the regular PR contribution workflow.
Steps
-
Enable build artifacts in
conda-forge.ymland rerender:workflow_settings:store_build_artifacts: true -
Open a PR and let the regular CI build the packages for you.
-
Download the PR artifacts starting with
conda_artifacts_orconda_pkgs_to a suitable location, and extract the contents from the (possibly nested) Zip archive(s). -
Run the tests:
- v0 (meta.yaml)
- v1 (recipe.yaml)
conda-build --override-channels --channel conda-forge --test path/to/your-package-*.condarattler-build test --package-file path/to/your-package-*.conda
Automated script
Steps 3 and 4 can be automated with this script. Copy it somewhere and run it with uv:
uv run test_remote_conda_packages.py URL_TO_GITHUB_PR_OR_COMMIT
If you don't have access to a GPU-equipped machine, you may try services like Google Colab, Kaggle and Marimo Molab, which are known for offering free GPUs along with the notebook-centric IDEs.