Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: snapshot test as standalone job #8481

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build
description: build the project
runs:
using: "composite"
steps:
- uses: actions/setup-node@v3
with:
node-version: 16

- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.x
7.x
- run: npm install
shell: bash
working-directory: templates

- run: npm run lint
shell: bash
working-directory: templates

- run: npm run build
shell: bash
working-directory: templates

- run: dotnet build -c Release
shell: bash
27 changes: 1 addition & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,8 @@ jobs:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.x
7.x

- run: npm install
working-directory: templates

- run: npm run lint
working-directory: templates

- run: npm run build
working-directory: templates

- run: dotnet build -c Release

- run: choco install wkhtmltopdf
if: matrix.os == 'windows-latest'

- run: dotnet test -c Release --filter Stage=Snapshot --no-build --collect:"XPlat Code Coverage"
working-directory: test/docfx.Snapshot.Tests
- uses: ./.github/actions/build

- run: dotnet test -c Release -f net7.0 --filter Stage!=Snapshot --no-build --collect:"XPlat Code Coverage"

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/snapshot-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ci
on:
pull_request:
branches: [ main, feature/*, hotfix/* ]
push:
branches: [ main, feature/*, hotfix/* ]

jobs:
snapshot-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true

- uses: ./.github/actions/build

- run: choco install wkhtmltopdf

- run: dotnet test -c Release -f net7.0 --no-build
working-directory: test/docfx.Snapshot.Tests