Skip to main content

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​

  1. Enable build artifacts in conda-forge.yml and rerender:

    workflow_settings:
    store_build_artifacts: true
  2. Open a PR and let the regular CI build the packages for you.

  3. Download the PR artifacts starting with conda_artifacts_ or conda_pkgs_ to a suitable location, and extract the contents from the (possibly nested) Zip archive(s).

  4. Run the tests:

    rattler-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
tip

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.