-
Notifications
You must be signed in to change notification settings - Fork 370
Workflow refactoring and improvements #273
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
Merged
jeffhandley
merged 7 commits into
modelcontextprotocol:main
from
jeffhandley:jeffhandley/workflows
Apr 11, 2025
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
669a7e6
Remove code coverage PR commenting
jeffhandley 10e21b2
Only run markdown-link-check when markdown files are updated
jeffhandley 863d23a
Declare CI workflow permissions
jeffhandley 6fd0b61
Refactor release workflow and declare permissions
jeffhandley a9ce225
Pin all actions to SHAs
jeffhandley f9b378f
Run CI manually, on all pushes to main, or if code changes in a PR
jeffhandley 345ff44
NuGet publishing doesn't need any permissions
jeffhandley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,20 +3,23 @@ name: Code Coverage | |
on: | ||
workflow_call: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
publish-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 | ||
with: | ||
dotnet-version: | | ||
9.0.x | ||
8.0.x | ||
|
||
- name: Download test results | ||
uses: actions/download-artifact@v4 | ||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1 | ||
with: | ||
pattern: testresults-* | ||
|
||
|
@@ -33,14 +36,14 @@ jobs: | |
toolpath: "reportgeneratortool" | ||
|
||
- name: Upload combined coverage XML | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
with: | ||
name: coverage | ||
path: ${{ github.workspace }}/report | ||
retention-days: 7 | ||
|
||
- name: Publish code coverage report | ||
uses: irongut/[email protected] | ||
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0 | ||
with: | ||
filename: "report/Cobertura.xml" | ||
badge: true | ||
|
@@ -53,19 +56,12 @@ jobs: | |
thresholds: "60 80" | ||
|
||
- name: Upload combined coverage markdown | ||
uses: actions/upload-artifact@v4 | ||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
with: | ||
name: coverage-markdown | ||
path: ${{ github.workspace }}/code-coverage-results.md | ||
retention-days: 7 | ||
|
||
- name: Add Coverage PR Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | ||
with: | ||
recreate: true | ||
path: ${{ github.workspace }}/code-coverage-results.md | ||
|
||
- name: Coverage on step summary | ||
if: always() | ||
run: cat "${{ github.workspace }}/report/SummaryGithub.md" >> $GITHUB_STEP_SUMMARY |
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
name: Check Markdown links | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
push: | ||
branches: [ "main" ] | ||
paths: "**.md" | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: "**.md" | ||
jeffhandley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
markdown-link-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Markup Link Checker (mlc) | ||
uses: becheran/[email protected] | ||
uses: becheran/mlc@c925f90a9a25e16e4c4bfa29058f6f9ffa9f0d8c # v0.21.0 | ||
with: | ||
# Ignore external links that result in 403 errors during CI. Do not warn for redirects where we want to keep the vanity URL in the markdown or for GitHub links that redirect to the login. | ||
args: --ignore-links "https://www.anthropic.com/*,https://hackerone.com/anthropic-vdp/*" --do-not-warn-for-redirect-to "https://modelcontextprotocol.io/*,https://github.com/login?*" ./ |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.