Skip to content

Commit 5371ec6

Browse files
authored
Merge pull request #154 from dhensby/pulls/coverage
ci: improve workflows
2 parents 2b85585 + 10387f2 commit 5371ec6

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

.github/workflows/nodejs.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ jobs:
8181
needs:
8282
- commitlint
8383
- codelint
84-
permissions:
85-
contents: read
86-
pull-requests: write # to be able to comment on released pull requests
8784
steps:
8885
- uses: actions/checkout@v3
8986
with:
@@ -97,24 +94,15 @@ jobs:
9794
run: npm ci
9895
- name: Test code
9996
run: npm run test:coverage
100-
- name: Code Coverage Summary
101-
uses: irongut/CodeCoverageSummary@v1.3.0
102-
with:
103-
filename: coverage/cobertura-coverage.xml
104-
badge: true
105-
format: markdown
106-
output: both
107-
- name: Add Coverage PR Comment
108-
uses: marocchino/sticky-pull-request-comment@v2
109-
if: github.event_name == 'pull_request'
110-
continue-on-error: true
111-
with:
112-
recreate: true
113-
path: code-coverage-results.md
97+
- name: Report coverage
98+
run: |
99+
echo "# Code coverage" >> $GITHUB_STEP_SUMMARY
100+
npx nyc report | sed --expression='1d;$d' >> $GITHUB_STEP_SUMMARY
101+
if: always()
114102
release:
115103
name: Release
116104
concurrency: release
117-
if: ${{ github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
105+
if: ${{ github.repository_owner == 'dhensby' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
118106
runs-on: ubuntu-latest
119107
needs:
120108
- commitlint

0 commit comments

Comments
 (0)