Skip to content

Commit 9a35f83

Browse files
authored
feat: add devcontainer (#1483)
1 parent d3a4fd4 commit 9a35f83

File tree

5 files changed

+69
-1
lines changed

5 files changed

+69
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
3+
{
4+
"name": "Full",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/dotnet/sdk:9.0-preview",
7+
"features": {
8+
"ghcr.io/devcontainers/features/dotnet:2": {
9+
"version": "latest",
10+
"additionalVersions": "6.0,5.0,3.1"
11+
}
12+
},
13+
14+
// Features to add to the dev container. More info: https://containers.dev/features.
15+
// "features": {},
16+
17+
// Configure tool-specific properties.
18+
"customizations": {
19+
"vscode": {
20+
"extensions": [
21+
"ms-dotnettools.csdevkit",
22+
"yzhang.markdown-all-in-one",
23+
"vscode-icons-team.vscode-icons",
24+
"me-dutour-mathieu.vscode-github-actions"
25+
]
26+
}
27+
},
28+
29+
"postCreateCommand": "bash .devcontainer/post-install.sh"
30+
31+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
32+
// "remoteUser": "root"
33+
}

.devcontainer/post-install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#/bin/bash
2+
3+
# Install docfx (should be aligned with docs-deploy.yml)
4+
dotnet tool install --global docfx --version 2.74.1
5+
6+
# Trust dotnet developer certs
7+
dotnet dev-certs https --check --trust

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ bld/
2626

2727
# Visual Studio 2015/2017 cache/options directory
2828
.vs/
29-
.vscode/
3029
# Uncomment if you have tasks that create the project's static files in wwwroot
3130
#wwwroot/
3231

.vscode/tasks.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Serve Docs (Without Build)",
8+
"type": "shell",
9+
"command": "docfx metadata docs/site/docfx.json && docfx docs/site/docfx.json --serve"
10+
},
11+
{
12+
"label": "Serve Docs (With Build for API Documentation)",
13+
"type": "shell",
14+
"command": "dotnet build -c Release && docfx metadata docs/site/docfx.json && docfx docs/site/docfx.json --serve"
15+
},
16+
{
17+
"label": "Run all tests (Release Mode)",
18+
"type": "shell",
19+
"command": "dotnet test -c Release"
20+
}
21+
]
22+
}

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ Here are some resources to help you get started on how to contribute code or new
2424
* ["Help wanted" issues](https://github.com/egil/bunit/labels/help%20wanted) - these issues are up for grabs if you want to create a fix. To do this, simply comment on the issue you want to fix.
2525
* ["Good first issue" issues](https://github.com/egil/bunit/labels/good%20first%20issue) - these are good for newcomers. Good first issues are small, usually require just a few hours of work, and do not require a deep technical knowledge of bUnit. This is a good place to start if you want to become familiar with bUnit’s inner workings and maybe take on bigger issues later.
2626

27+
### Using Codespaces
28+
29+
bUnit offers predefined Codespaces to enable contributing to the project without having to set up a local development environment.
30+
The Codespace is pre-configured with the necessary tools and dependencies to build and run the project including the .NET SDK but also serves the documentation site.
31+
32+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/bUnit-dev/bUnit?quickstart=1)
33+
2734
### Identifying the Scale of a Contribution
2835

2936
If you would like to contribute to bUnit, first identify the scale of what you would like to contribute. If it is small (grammar/spelling or a bug fix), feel free to start working on a fix. If you are submitting a feature or substantial code contribution, please discuss it with us first.

0 commit comments

Comments
 (0)