Skip to content

Add doc comment to suppress warnings on snapshot test. #1806

Add doc comment to suppress warnings on snapshot test.

Add doc comment to suppress warnings on snapshot test. #1806

Workflow file for this run

name: ci
on:
pull_request:
branches: [ main, feature/*, hotfix/* ]
push:
branches: [ main, feature/*, hotfix/* ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: ./.github/actions/build
- run: npm run lint
shell: bash
working-directory: templates
- run: npm test
shell: bash
working-directory: templates
- run: choco install wkhtmltopdf
if: matrix.os == 'windows-latest'
- run: dotnet test -c Release -f net8.0 --no-build --collect:"XPlat Code Coverage"
if: matrix.os == 'ubuntu-latest'
- run: dotnet test -c Release -f net7.0 --no-build --collect:"XPlat Code Coverage"
- run: dotnet test -c Release -f net6.0 --no-build --collect:"XPlat Code Coverage"
if: matrix.os == 'ubuntu-latest'
- uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
- run: dotnet run -c Release --no-build -f net7.0 --project src/docfx -- docs/docfx.json
- run: dotnet run -c Release --no-build -f net7.0 --project src/docfx -- metadata samples/seed/docfx.json
- run: dotnet run -c Release --no-build -f net7.0 --project src/docfx -- build samples/seed/docfx.json --output docs/_site/seed
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
name: site
path: docs/_site
snapshot:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: ./.github/actions/build
- run: dotnet test -c Release -f net7.0 --no-build --filter Stage=Snapshot
working-directory: test/docfx.Snapshot.Tests
env:
SNAPSHOT_TEST: true
BUILD_SERVER: ${{ github.event_name != 'pull_request' }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: github.event_name == 'pull_request'
with:
commit_message: 'test(snapshot): update snapshots for ${{ github.sha }}'
publish-docs:
if: github.ref == 'refs/heads/main'
needs: [test, snapshot]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v3
with:
name: site
path: site
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site