Skip to content

🤖 update checkout to v3 #1

🤖 update checkout to v3

🤖 update checkout to v3 #1

Workflow file for this run

name: Build, test and deploy docs
env:
ACTIONS_RUNNER_NODE20: true
on:
push:
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore dependencies
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release --no-build --verbosity normal --logger "trx;LogFileName=TestResults.trx"
- name: Adding dotnet tools
run: dotnet tool restore
- name: Ensure Coverlet Install
run: dotnet tool install --global coverlet.console --version 6.0.0.0
- name: Install ReportGenerator
run: dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Generate test results using coverlet
run: coverlet testing/bin/Release/net8.0/testing.dll --target "dotnet" --targetargs "test -c Release --no-build" --format opencover --exclude-by-attribute 'Visual' --exclude-by-attribute 'Obsolete'
- name: Convert coverage report to lcov format
run: reportgenerator "-reports:./coverage.opencover.xml" "-targetdir:coverage" "-reporttypes:lcov"
- name: Coveralls upload
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info
publish-docs:
needs: build-and-test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Build
run: dotnet build -c Release
- name: Install DocFX
run: dotnet tool update -g docfx
- name: Create docs
run: docfx docs/docfx.json
- name: Deploy
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true