-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/hays0503/sck1
- Loading branch information
Showing
4 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Update Coverage in README | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths-ignore: | ||
- '**/*.md' | ||
- '**/*.yml' | ||
- '.github/**' | ||
- 'data/**' | ||
- 'dist/**' | ||
|
||
jobs: | ||
update-coverage-in-readme: | ||
name: Update Coverage in README | ||
runs-on: hays-linux | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Jest Coverage Comment | ||
if: github.ref == 'refs/heads/main' | ||
id: coverageComment | ||
uses: MishaKav/jest-coverage-comment@main | ||
with: | ||
hide-summary: true | ||
coverage-summary-path: ./coverage/coverage-summary.json | ||
|
||
- name: Update README with Coverage HTML | ||
if: github.ref == 'refs/heads/main' | ||
run: | | ||
sed -i '/<!-- Jest Coverage Comment:Begin -->/,/<!-- Jest Coverage Comment:End -->/c\<!-- Jest Coverage Comment:Begin -->\n\${{ steps.coverageComment.outputs.summaryHtml }}\n<!-- Jest Coverage Comment:End -->' ./README.md | ||
- name: Commit & Push changes in README | ||
if: github.ref == 'refs/heads/main' | ||
uses: actions-js/push@master | ||
with: | ||
message: Update coverage in README | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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 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