Test fixture for the API pipeline #90
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
name: Build | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: Statiq.Docs | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
env: | |
# https://github.com/NuGet/Home/issues/11548 | |
# https://twitter.com/xoofx/status/1488617114940452872?s=20&t=BKSN4j9rP6fOyg8l7aW0eg | |
NUGET_CERT_REVOCATION_MODE: offline | |
steps: | |
- name: Get Source | |
uses: actions/checkout@v2 | |
with: | |
path: Statiq.Docs | |
submodules: recursive | |
- name: Checkout Statiq.Framework | |
uses: actions/checkout@v2 | |
with: | |
repository: statiqdev/Statiq.Framework | |
path: Statiq.Framework | |
submodules: recursive | |
- name: Checkout Statiq.Web | |
uses: actions/checkout@v2 | |
with: | |
repository: statiqdev/Statiq.Web | |
path: Statiq.Web | |
submodules: recursive | |
- name: Install .NET Core SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: | | |
3.1.x | |
6.0.x | |
- name: Build and Test | |
run: dotnet test --logger "trx;LogFileName=test-results.trx" | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v2 | |
if: success() || failure() | |
with: | |
name: test-results-${{ matrix.os }} | |
path: '**/test-results.trx' |