.NET Core CI #481
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
# For details of what checks are run for PRs please refer below | |
name: .NET Core CI | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
# Fail if there are build warnings | |
# | |
# As a general code quality check we use FxCop analyzers. | |
# | |
# To check for build warnings locally you may need to run a clean build. | |
# | |
# This can be done by running `dotnet clean` before running `dotnet build` | |
build-warnings: | |
name: Build warnings check | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Build | |
run: dotnet build /WarnAsError | |
test: | |
name: Tests on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Install protocol buffers compiler on Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
wget -O protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip | |
unzip protoc.zip -d $HOME/.local | |
export PATH="$PATH:$HOME/.local/bin" | |
- name: Tests | |
run: | | |
dotnet test | |
documentation-build: | |
name: "Build documentation" | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Download DocFX | |
run: | | |
wget -O docfx.zip https://github.com/dotnet/docfx/releases/download/v2.58.4/docfx.zip | |
unzip docfx.zip -d docfx/ | |
chmod +x docfx/docfx.exe | |
- name: Build documentation | |
run: | | |
docfx/docfx.exe docs/docfx.json |