diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index ab33423..294d4be 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -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: @@ -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