ci: Separate job for testing

The matrix build for published platforms is getting extremely large.
It's no longer efficient or productive to run the unit tests during that
job. Instead, a much smaller job is now run prior to the Build job for
running tests.
pull/92/head
Robert Dailey 2 years ago
parent 347028ed3a
commit 87f028978d

@ -15,8 +15,33 @@ env:
dotnetVersion: "6.0.x" dotnetVersion: "6.0.x"
jobs: jobs:
test:
name: Test
strategy:
fail-fast: true
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone for GitVersion
- name: Setup .NET Core SDK ${{ env.dotnetVersion }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnetVersion }}
- name: Test
run: dotnet test src --configuration Release --logger GitHubActions
build: build:
name: Build name: Build
needs: test
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
@ -45,9 +70,6 @@ jobs:
with: with:
dotnet-version: ${{ env.dotnetVersion }} dotnet-version: ${{ env.dotnetVersion }}
- name: Test
run: dotnet test src --configuration Release --logger GitHubActions
- name: Publish - name: Publish
shell: pwsh shell: pwsh
run: ci/Publish.ps1 ${{ matrix.runtime }} run: ci/Publish.ps1 ${{ matrix.runtime }}
@ -59,19 +81,16 @@ jobs:
path: publish/${{ matrix.runtime }}/* path: publish/${{ matrix.runtime }}/*
smoke: smoke:
name: Smoke Test name: Smoke
needs: build needs: build
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- image: windows-latest - {os: windows-latest, runtime: win-x64}
runtime: win-x64 - {os: ubuntu-latest, runtime: linux-x64}
- image: ubuntu-latest - {os: macos-latest, runtime: osx-x64}
runtime: linux-x64 runs-on: ${{ matrix.os }}
- image: macos-latest
runtime: osx-x64
runs-on: ${{ matrix.image }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2

Loading…
Cancel
Save