diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index feb4dff..360767f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,12 +1,12 @@ -## Describe your changes +## โœ๏ธ Describe your changes _None_ -## Issue ticket number and link +## ๐Ÿ”— Issue ticket number and link _None_ -## Checklist before requesting a review +## โœ… Checklist before requesting a review - [ ] I have performed a self-review of my code. - [ ] If it is a core feature, I have added thorough tests. diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f9ba1d6..0eabbba 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -22,11 +22,32 @@ jobs: - name: ๐Ÿ› ๏ธ Sync versions run: yarn script:sync-projects + - name: ๐Ÿ› ๏ธ Find PR + uses: jwalton/gh-find-current-pr@v1 + id: findPr + - name: ๐Ÿงน Lint run: yarn lint - name: ๐Ÿงช Run tests - run: yarn test:jest + run: npx jest --ci --json --coverage --testLocationInResults --outputFile=coverage/report.json + + - name: ๐Ÿงช Create coverage report markdown + uses: ArtiomTr/jest-coverage-report-action@v2 + id: coverage + with: + prnumber: ${{ steps.findPr.outputs.number }} + coverage-file: coverage/report.json + package-manager: yarn + custom-title: ๐Ÿงช Unit tests + threshold: 80 + skip-step: all + output: report-markdown + + - name: ๐Ÿ’ฌ Create coverage report comment + uses: marocchino/sticky-pull-request-comment@v2 + with: + message: ${{ steps.coverage.outputs.report }} - name: โฌ†๏ธ Upload coverage reports uses: codecov/codecov-action@v4