dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
3.94k stars 840 forks source link

chore: Add snapshot update workflow #9969

Closed filzrev closed 1 month ago

filzrev commented 1 month ago

This PR intended to resolve #9831 issue.

Currently snapshots are not synced to latest snapshot tests results. This PR add snapshot,yml workflow to update snapshots. And run ci.yml if snapshots are updated.

How to run snapshot update workflow

First of all. This PR must be merged to main branch to run workflow.

After PR is merged. It can run workflow via GitHub Action Web UI. image

It can also run workflow by using gh command.

gh workflow run snapshot.yml --repo dotnet/docfx --ref test-branch -f dryrun=true

How to test snapshot workflow

  1. Ensure this PR is merged to main branch.
  2. Create test branch (e.g. test-branch) and push to GitHub.
  3. Run snapshot workflow with dryrun=false setting
  4. Confirm snapshot is updated by workflow. And cy.yml is executed.

If it's confirmed to works as expected. Please try to update main branch snapshot.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.92%. Comparing base (fe673ec) to head (40f095a). Report is 183 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9969 +/- ## ========================================== + Coverage 74.31% 78.92% +4.60% ========================================== Files 536 540 +4 Lines 23189 23433 +244 Branches 4056 4059 +3 ========================================== + Hits 17234 18494 +1260 + Misses 4853 3802 -1051 - Partials 1102 1137 +35 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.