Skip to content

Commit

Permalink
Merge pull request #154 from dhensby/pulls/coverage
Browse files Browse the repository at this point in the history
ci: improve workflows
  • Loading branch information
dhensby committed Sep 4, 2023
2 parents 2b85585 + 10387f2 commit 5371ec6
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ jobs:
needs:
- commitlint
- codelint
permissions:
contents: read
pull-requests: write # to be able to comment on released pull requests
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -97,24 +94,15 @@ jobs:
run: npm ci
- name: Test code
run: npm run test:coverage
- name: Code Coverage Summary
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/cobertura-coverage.xml
badge: true
format: markdown
output: both
- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
continue-on-error: true
with:
recreate: true
path: code-coverage-results.md
- name: Report coverage
run: |
echo "# Code coverage" >> $GITHUB_STEP_SUMMARY
npx nyc report | sed --expression='1d;$d' >> $GITHUB_STEP_SUMMARY
if: always()
release:
name: Release
concurrency: release
if: ${{ github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
if: ${{ github.repository_owner == 'dhensby' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
needs:
- commitlint
Expand Down

0 comments on commit 5371ec6

Please sign in to comment.