-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eric sciple
committed
Feb 6, 2020
1 parent
b782114
commit cf5f899
Showing
627 changed files
with
22,615 additions
and
104,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,91 @@ | ||
| name: Main workflow | ||
| on: [push, pull_request] | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
| - releases/* | ||
|
|
||
| jobs: | ||
| run: | ||
| name: Run | ||
| build: | ||
| runs-on: ${{ matrix.operating-system }} | ||
| strategy: | ||
| matrix: | ||
| operating-system: [ubuntu-latest, windows-latest, macOS-latest] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@master | ||
|
|
||
| - name: Set Node.js 10.x | ||
| uses: actions/setup-node@master | ||
| uses: actions/checkout@v2 | ||
| - name: Set Node.js 12 | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| version: 10.x | ||
| version: 12.x | ||
| - run: npm ci | ||
| - run: npm run build | ||
| - run: npm run format-check | ||
| - run: npm test | ||
| - name: Verify no unstaged changes | ||
| if: runner.os != 'windows' | ||
| run: __tests__/verify-no-unstaged-changes.sh | ||
|
|
||
| - name: npm install | ||
| run: npm install | ||
| test: | ||
| runs-on: ${{ matrix.operating-system }} | ||
| strategy: | ||
| matrix: | ||
| operating-system: [ubuntu-latest, windows-latest, macOS-latest] | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Clear tool cache | ||
| run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old" | ||
| - name: Setup dotnet 3.0.100 | ||
| uses: ./ | ||
| with: | ||
| dotnet-version: 3.0.100 | ||
| - name: Verify dotnet | ||
| if: runner.os != 'windows' | ||
| run: __tests__/verify-dotnet.sh 3.0.100 | ||
| - name: Verify dotnet (Windows) | ||
| if: runner.os == 'windows' | ||
| run: __tests__/verify-dotnet.ps1 3.0.100 | ||
|
|
||
| - name: Lint | ||
| run: npm run format-check | ||
| test-proxy: | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: mcr.microsoft.com/dotnet/core/runtime-deps:3.0-bionic | ||
| options: --dns 127.0.0.1 | ||
| services: | ||
| squid-proxy: | ||
| image: datadog/squid:latest | ||
| ports: | ||
| - 3128:3128 | ||
| env: | ||
| https_proxy: http://squid-proxy:3128 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Clear tool cache | ||
| run: rm -rf $RUNNER_TOOL_CACHE/* | ||
| - name: Setup dotnet 3.0.100 | ||
| uses: ./ | ||
| with: | ||
| dotnet-version: 3.0.100 | ||
| - name: Verify dotnet | ||
| run: __tests__/verify-dotnet.sh 3.0.100 | ||
|
|
||
| - name: npm test | ||
| run: npm test | ||
| test-bypass-proxy: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| https_proxy: http://no-such-proxy:3128 | ||
| no_proxy: github.com,dotnetcli.blob.core.windows.net,download.visualstudio.microsoft.com,api.nuget.org | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| - name: Clear tool cache | ||
| run: mv "${{ runner.tool_cache }}" "${{ runner.tool_cache }}.old" | ||
| - name: Setup dotnet 3.0.100 | ||
| uses: ./ | ||
| with: | ||
| dotnet-version: 3.0.100 | ||
| - name: Verify dotnet | ||
| run: __tests__/verify-dotnet.sh 3.0.100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| using System; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace sample_csproj | ||
| { | ||
| class Program | ||
| { | ||
| static void Main(string[] args) | ||
| { | ||
| var json = JsonConvert.SerializeObject(new[] {"Hello", "World!" }); | ||
| Console.WriteLine(json); | ||
| } | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "runtimeOptions": { | ||
| "configProperties": { | ||
| "System.Globalization.Invariant": true | ||
| } | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>netcoreapp3.0</TargetFramework> | ||
| <RootNamespace>sample_csproj</RootNamespace> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Newtonsoft.Json" Version="12.0.3" /> | ||
| </ItemGroup> | ||
|
|
||
| </Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| if (!$args[0]) | ||
| { | ||
| throw "Must supply dotnet version argument" | ||
| } | ||
|
|
||
| $dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path } | ||
| Write-Host "Found '$dotnet'" | ||
|
|
||
| $version = & $dotnet --version | Out-String | ForEach-Object { $_.Trim() } | ||
| Write-Host "Version $version" | ||
| # if ($version -ne $args[0]) | ||
| # { | ||
| # Write-Host "PATH='$env:path'" | ||
| # Write-Host "gcm dotnet:" | ||
| # gcm dotnet | fl | ||
| # throw "Unexpected version" | ||
| # } | ||
|
|
||
| Write-Host "Building sample csproj" | ||
| & $dotnet build __tests__/sample-csproj/ --no-cache | ||
| if ($LASTEXITCODE -ne 0) | ||
| { | ||
| throw "Unexpected exit code $LASTEXITCODE" | ||
| } | ||
|
|
||
| Write-Host "Testing compiled app" | ||
| $sample_output = "$(__tests__/sample-csproj/bin/Debug/netcoreapp3.0/sample.exe)".Trim() | ||
| Write-Host "Sample output: $sample_output" | ||
| if ($sample_output -notlike "*Hello*World*") | ||
| { | ||
| throw "Unexpected output" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| if [ -z "$1" ]; then | ||
| echo "Must supply dotnet version argument" | ||
| exit 1 | ||
| fi | ||
|
|
||
| dotnet_version="$(dotnet --version)" | ||
| echo "Found dotnet version '$dotnet_version'" | ||
| if [ -z "$(echo $dotnet_version | grep $1)" ]; then | ||
| echo "Unexpected version" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Building sample csproj" | ||
| dotnet build __tests__/sample-csproj/ --no-cache || exit 1 | ||
|
|
||
| echo "Testing compiled app" | ||
| sample_output="$(__tests__/sample-csproj/bin/Debug/netcoreapp3.0/sample)" | ||
| echo "Sample output: $sample_output" | ||
| if [ -z "$(echo $sample_output | grep Hello)" ]; then | ||
| echo "Unexpected output" | ||
| exit 1 | ||
| fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/bin/bash | ||
|
|
||
| if [[ "$(git status --porcelain)" != "" ]]; then | ||
| echo ---------------------------------------- | ||
| echo git status | ||
| echo ---------------------------------------- | ||
| git status | ||
| echo ---------------------------------------- | ||
| echo git diff | ||
| echo ---------------------------------------- | ||
| git diff | ||
| echo ---------------------------------------- | ||
| echo Troubleshooting | ||
| echo ---------------------------------------- | ||
| echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run pre-checkin" | ||
| exit 1 | ||
| fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.