From 867b2230f0cb8e182a7112dc51d78d788c9d617d Mon Sep 17 00:00:00 2001 From: Chris Darroch Date: Wed, 12 Aug 2020 00:56:54 -0700 Subject: [PATCH] setup GitHub Actions build and test steps We define GitHub Actions YAML which runs a simplified version of the BuildScalarFor*.{bat,sh} and RunUnitTests.{bat,sh} scripts under Scripts/. One difference is that we use a Release build configuration instead of using a Build configuration as our default. We also do not define the ScalarVersion MSBuild property and instead rely on what is set in Directory.Build.props. h/t kyle-rader --- .github/workflows/continuous-integration.yml | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/continuous-integration.yml diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000000..cd5b10a815 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,37 @@ +name: Scalar + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + validate_scalar: + name: "CI" + + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-2019, macos-10.15] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.302 + + - name: Install Dependencies + run: dotnet restore + env: + DOTNET_NOLOGO: 1 + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Unit Test + run: dotnet test --no-restore