Testing Codespace definition in devcontainer.json #3464
-
|
Hi! I am wondering if it is possible to test the codespaces definition. Desired workflow:
Is it supported / planned? Thanks! Related PR: HypothesisWorks/hypothesis#2880 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Feels like what you would like is an action that builds your container using your devcontainer.json exactly how it would if running a codespace and then use a docker action to run whatever you want to run inside that container and report the results - in your case report on the status of a unit test suite run? What would actually be cool is to generate your exact codespace container image as part of your builds and then for your CI builds (not PR builds) actually store this in GitHub Container Registry so that when you come to do a 'Run in Codespace' it can just pull a pre-built container rather than having to do any post-build steps. As you want to generate that container anyway to run your tests in it, pretty efficient. At the moment you could get part of the way there by building the container inside your CD action and dropping it into GHCR which then allows you to get rid of the postcreate steps in your devcontainer.json. But I can def see how an action that you can point at an existing devcontainer and get a docker container out would be even better. |
Beta Was this translation helpful? Give feedback.
Feels like what you would like is an action that builds your container using your devcontainer.json exactly how it would if running a codespace and then use a docker action to run whatever you want to run inside that container and report the results - in your case report on the status of a unit test suite run?
What would actually be cool is to generate your exact codespace container image as part of your builds and then for your CI builds (not PR builds) actually store this in GitHub Container Registry so that when you come to do a 'Run in Codespace' it can just pull a pre-built container rather than having to do any post-build steps. As you want to generate that container anyway to run y…