-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add devcontainer.json #472
Conversation
0bb2870
to
1a8e240
Compare
Codecov ReportPatch coverage has no change and project coverage change:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #472 +/- ##
==========================================
+ Coverage 59.91% 59.93% +0.01%
==========================================
Files 33 33
Lines 5409 5409
==========================================
+ Hits 3241 3242 +1
+ Misses 2168 2167 -1
☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here. |
This looks straight-forward, but I know very little about VSCode/devcontainers. @juanky201271 as far as I know you're the only one of us who's used tools along the lines of VSCode...if you have a couple minutes to sanity-check this I'd appreciate it! |
Maybe it's my local configuration, but when I try to [2023-09-08T17:45:58.469Z]
|
@juanky201271 Thanks for testing. The relative paths in the Dockerfile work in a Codespaces container but not a local container I guess. Let me look more into this... |
1a8e240
to
ef8e408
Compare
Ok, for me it works both in VS Code local dev containers as well as Codespaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's working with VS in local... Great!
This ensures that VS Code or GitHub Codespaces can automatically create an environment where
cargo build
andcargo test
work.Devcontainer (on its own)
VS Code supports these natively. So long as you have Docker running, it'll create a container and map the git repo you already have into it if you run the "Reopen in devcontainer" command. Then you'll have all the tools necessary to build and test this repo, independent of what you may (not) have available on your regular dev machine.
Codespaces
Codespaces leverage the devcontainer.json but adds value by hosting the container in the cloud for you. Learn more about GitHub Codespaces.
This root repo should consider setting up a prebuild of the Codespace to cache the docker image creation to make Codespace creation take just seconds.
For those using it, GitHub personal accounts can use Codespace VMs for free, to a point. Learn details here.
Note also that Codespaces VMs will sign your commits only if you have the repo set as a 'trusted' repo in your GitHub personal account settings.
You can see a sample of how Codespaces works by visiting the source branch of this PR and clicking the "<> Code" button:
Or use the
...
button to configure the size of the Codespace VM. Give yourself a 16 core machine and see just how fastcargo build
can go!