alan-turing-institute / python-project-template

15 stars 3 forks source link

ci: add CI for template instantiation #24

Closed Jacob-Stevens-Haas closed 9 months ago

Jacob-Stevens-Haas commented 9 months ago

This PR adds CI to create an instance of the template and run pre-commits on it. Hopefully this can help with #14

I believe this counts as fixing #4, depending on what you want to see in the CI.

Jacob-Stevens-Haas commented 9 months ago

I'm not sure why the PR didn't trigger the action in the PR, but it might need to be approved by repo owners, or add me as a collaborator?

phinate commented 9 months ago

Many thanks for doing this! It's a great start: I'd be keen to set up a matrix to run over python versions and different backends/config options too.

I'm not sure why the PR didn't trigger the action in the PR, but it might need to be approved by repo owners, or add me as a collaborator?

Huh. Never ran into this before. Can you confirm it runs locally with https://github.com/nektos/act just to make sure the YAML is GitHub-valid?

Jacob-Stevens-Haas commented 9 months ago

I think I have run into this before, let me see if I can look up why

Jacob-Stevens-Haas commented 9 months ago

Couldn't build act and most recent release binary didn't work, but did find this nugget in github actions docs:

Some events also require the workflow file to be present on the default branch of the repository in order to run.

It may need to be merged to be tested.

FWIW, you may also want to run CI on pushes to master, since master branch isn't protected.

Jacob-Stevens-Haas commented 9 months ago

:pray: