From abb1260373fdd6e4182d2fe95152682bca463810 Mon Sep 17 00:00:00 2001 From: Aleksandar Ivanov <74899441+aleks-ivanov@users.noreply.github.com> Date: Fri, 18 Jun 2021 12:11:18 +0300 Subject: [PATCH 1/2] Create Codespace configuration (#14) --- .devcontainer/Dockerfile | 19 +++++++++++++++++++ .devcontainer/devcontainer.json | 27 +++++++++++++++++++++++++++ .gitignore | 1 + 3 files changed, 47 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..d03a67cf6 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,19 @@ +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0.201.7-5.0 + +# Install Mono for running tests +RUN sudo apt install gnupg ca-certificates && \ + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ + echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list && \ + sudo apt update && \ + sudo apt install -y mono-complete + +# Install .NET Core 3.1 for running tests +RUN sudo apt-get install wget && \ + wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \ + sudo dpkg -i packages-microsoft-prod.deb && \ + sudo apt-get update && \ + sudo apt-get install -y apt-transport-https && \ + sudo apt-get update && \ + sudo apt-get install -y dotnet-sdk-3.1 + +# Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..e5f1586f9 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,27 @@ +{ + "name": "RestSharp Codespace", + "settings": { + "workbench.colorTheme": "Default Dark+", + "terminal.integrated.defaultProfile.linux": "pwsh" + }, + "extensions": [ + "eamodio.gitlens", + "ms-dotnettools.csharp", + "VisualStudioExptTeam.vscodeintellicode", + "ms-vscode.powershell", + "cschleiden.vscode-github-actions", + "redhat.vscode-yaml", + "bierner.markdown-preview-github-styles", + "ban.spellright", + "jmrog.vscode-nuget-package-manager", + "coenraads.bracket-pair-colorizer", + "vscode-icons-team.vscode-icons", + "editorconfig.editorconfig" + ], + "postCreateCommand": "dotnet restore RestSharp.sln && dotnet build RestSharp.sln --configuration Release --no-restore && dotnet test RestSharp.sln --configuration Release --no-build", + "build": { + "dockerfile": "Dockerfile" + } +} + +// Built with ❤ by [Pipeline Foundation](https://pipeline.foundation) \ No newline at end of file diff --git a/.gitignore b/.gitignore index d07351da2..aa786088f 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ RestSharp.IntegrationTests/config.json /node_modules/ /out/ /docs/.vuepress/dist/ +.vscode/ \ No newline at end of file From 32f64144024e36862c9a1b76413845d288362b05 Mon Sep 17 00:00:00 2001 From: Aleksandar Ivanov <74899441+aleks-ivanov@users.noreply.github.com> Date: Wed, 23 Jun 2021 11:36:33 +0300 Subject: [PATCH 2/2] reduce Docker weight (#15) --- .devcontainer/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d03a67cf6..132103bbb 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -5,10 +5,9 @@ RUN sudo apt install gnupg ca-certificates && \ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list && \ sudo apt update && \ - sudo apt install -y mono-complete - + sudo apt install -y mono-complete && \ # Install .NET Core 3.1 for running tests -RUN sudo apt-get install wget && \ + sudo apt-get install wget && \ wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \ sudo dpkg -i packages-microsoft-prod.deb && \ sudo apt-get update && \