distribution-spec icon indicating copy to clipboard operation
distribution-spec copied to clipboard

Best practice for GitHub action

Open vsoch opened this issue 5 years ago • 7 comments

I'm currently running the conformance tests locally, and I'd also like to add the GitHub action. The issue I'm facing is that I need to be able to cleanly start and stop my development server (within the run of the step). Is there a possible extension to the step to allow for a start/stop script or command?

vsoch avatar Oct 12 '20 20:10 vsoch

Take a look at how Quay has it configured as well. It's actually not great, we make our pytest infra exec the conformance binary, rather than using the upstream workflow:

https://github.com/quay/quay/blob/0a9487f8ac358b26aa12bb9851cb61c5786ac4dc/.github/workflows/CI.yaml#L135-L176 https://github.com/quay/quay/blob/0a9487f8ac358b26aa12bb9851cb61c5786ac4dc/test/registry/conformance_tests.py

jzelinskie avatar Oct 12 '20 21:10 jzelinskie

Ah perfecto! Thank you, I will take a look and see if I can do something similar (I'll close the issue with an update after that).

vsoch avatar Oct 12 '20 21:10 vsoch

Thank you @jzelinskie this worked beautifully! It's a shame we can't use the provided GitHub action, but it's fairly easy to also just compile the conformance test binary (maybe the maintainers here would consider an action that just generates the binary?) I was able to use similar logic and add a Django test and then as you did, compile the binary and run the tests. I think my question is addressed, so I'm going to close the issue. But if any maintainers of the repository here would be open to changes for how the action could be better used, I can definitely offer to help.

vsoch avatar Oct 12 '20 23:10 vsoch

I was wondering about this as well recently. I built out a container for use here https://github.com/users/clarkbw/packages/container/package/distribution-spec%2Fconformance and was considering creating a PR against this repo to auto-build this container and publish versions of it. https://github.com/opencontainers/distribution-spec/compare/master...clarkbw:master

clarkbw avatar Oct 13 '20 22:10 clarkbw

I would definitely appreciate that (and probably use it!) I think we'd need to know if the maintainers here would be open to it? Re-opening issue for discussion.

vsoch avatar Oct 14 '20 05:10 vsoch

I think publishing the image to Github would be a great thing to add upon merge to master.

This is probably a duplicate of https://github.com/opencontainers/distribution-spec/issues/109

jdolitsky avatar Oct 14 '20 22:10 jdolitsky

Note: current CI going through travis, so we would need to add new build manifests for actions

jdolitsky avatar Oct 14 '20 22:10 jdolitsky