Skip to content

Commit 56c3098

Browse files
authored
Resolves: Add GitHub Codespaces configuration (restsharp#1599)
* Create Codespace configuration (#14) * reduce Docker weight (#15)
1 parent 80e23bc commit 56c3098

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0.201.7-5.0
2+
3+
# Install Mono for running tests
4+
RUN sudo apt install gnupg ca-certificates && \
5+
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
6+
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list && \
7+
sudo apt update && \
8+
sudo apt install -y mono-complete && \
9+
# Install .NET Core 3.1 for running tests
10+
sudo apt-get install wget && \
11+
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
12+
sudo dpkg -i packages-microsoft-prod.deb && \
13+
sudo apt-get update && \
14+
sudo apt-get install -y apt-transport-https && \
15+
sudo apt-get update && \
16+
sudo apt-get install -y dotnet-sdk-3.1
17+
18+
# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)

.devcontainer/devcontainer.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "RestSharp Codespace",
3+
"settings": {
4+
"workbench.colorTheme": "Default Dark+",
5+
"terminal.integrated.defaultProfile.linux": "pwsh"
6+
},
7+
"extensions": [
8+
"eamodio.gitlens",
9+
"ms-dotnettools.csharp",
10+
"VisualStudioExptTeam.vscodeintellicode",
11+
"ms-vscode.powershell",
12+
"cschleiden.vscode-github-actions",
13+
"redhat.vscode-yaml",
14+
"bierner.markdown-preview-github-styles",
15+
"ban.spellright",
16+
"jmrog.vscode-nuget-package-manager",
17+
"coenraads.bracket-pair-colorizer",
18+
"vscode-icons-team.vscode-icons",
19+
"editorconfig.editorconfig"
20+
],
21+
"postCreateCommand": "dotnet restore RestSharp.sln && dotnet build RestSharp.sln --configuration Release --no-restore && dotnet test RestSharp.sln --configuration Release --no-build",
22+
"build": {
23+
"dockerfile": "Dockerfile"
24+
}
25+
}
26+
27+
// Built with ❤ by [Pipeline Foundation](https://pipeline.foundation)

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ RestSharp.IntegrationTests/config.json
5252
/node_modules/
5353
/out/
5454
/docs/.vuepress/dist/
55+
.vscode/

0 commit comments

Comments
 (0)