OpenAstronomy/github-actions-workflows

Pure/non-pure Python package testing

Closed this issue · 0 comments

Now that OpenAstronomy/build-python-dist#12 is merged, test_publish_pure_python.yml is now failing because this repo is using a non-pure Python package to test the pure Python workflow. However, if we change it to a pure Python package cibuildwheel will complain instead.

As both of the publish workflows work by checking out and building/testing the current ref of the current repository, we can't tell it to checkout an external repo during the test. And we can't include two packages in the same repo as they both need different setup.py files.

Can you use the name of current workflow (available via the GITHUB_WORKFLOW env var) to include/exclude the compiled code inside setup.py and __init__.py etc.?

An alternative solution would be:

  1. Create two new repositories: a sample pure Python package, and a sample non-pure Python package
  2. Add two new inputs to each of the workflows, repository and ref, which get passed to the checkout action
  3. Update the tests in this repo to point them to the main branch of the correct external repository

Can you think of a better way?