.net 8 #34
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 & Test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build | |
run: dotnet build src/VSPoll.API.sln | |
- name: Test | |
run: dotnet test /p:CollectCoverage=true /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:CoverletOutput=BuildReports/Coverage/ /p:CoverletOutputFormat=cobertura --collect:"XPlat Code Coverage" src/VSPoll.API.UnitTest/VSPoll.API.UnitTest.csproj | |
- name: Install DocFX | |
run: dotnet tool update -g docfx | |
- name: Run DocFX | |
run: docfx docfx/docfx.json | |
- name: Deploy DocFX | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/master' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docfx/_site |