2019-07-12 03:22:28 +07:00
|
|
|
name: Main workflow
|
2020-01-26 13:37:54 +07:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- releases/*
|
|
|
|
|
2019-07-12 03:22:28 +07:00
|
|
|
jobs:
|
2020-01-26 13:37:54 +07:00
|
|
|
build:
|
2019-07-12 03:22:28 +07:00
|
|
|
runs-on: ${{ matrix.operating-system }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-12-18 23:26:43 +07:00
|
|
|
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
2019-07-26 09:59:29 +07:00
|
|
|
steps:
|
2019-07-24 00:22:11 +07:00
|
|
|
- name: Checkout
|
2020-01-26 13:37:54 +07:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set Node.js 12
|
|
|
|
uses: actions/setup-node@v1
|
2019-07-12 03:22:28 +07:00
|
|
|
with:
|
2020-01-26 13:37:54 +07:00
|
|
|
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
|
2019-07-12 03:22:28 +07:00
|
|
|
|
2020-01-26 13:37:54 +07:00
|
|
|
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
|
2019-07-12 03:22:28 +07:00
|
|
|
|
2020-01-26 13:37:54 +07:00
|
|
|
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
|
2019-07-12 03:22:28 +07:00
|
|
|
|
2020-01-26 13:37:54 +07:00
|
|
|
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
|