-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd9855b
commit eded17a
Showing
5 changed files
with
80 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Annotate CI run with test results | ||
on: | ||
workflow_run: | ||
workflows: | ||
- "Run Tests" | ||
types: | ||
- completed | ||
permissions: | ||
actions: read | ||
contents: read | ||
checks: write | ||
pull-requests: write | ||
|
||
jobs: | ||
annotate: | ||
name: Annotate CI run with test results | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion != 'cancelled' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Annotate CI run with test results | ||
uses: dorny/[email protected] | ||
with: | ||
artifact: test-reports-${{ matrix.node-version }} | ||
name: Test Results (${{matrix.node-version}} | ||
path: "test-results.json" | ||
reporter: mocha-json |
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,42 @@ | ||
name: Comment PR Coverage | ||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
coverage_report: | ||
name: Generate coverage report | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
|
||
- name: Install Node Modules | ||
run: npm ci | ||
|
||
- name: Run Coverage Check | ||
run: npm run lcov | ||
|
||
- name: Setup LCOV | ||
uses: hrishikesh-kadam/setup-lcov@v1 | ||
|
||
- name: Report code coverage | ||
uses: zgosalvez/github-actions-report-lcov@v3 | ||
with: | ||
coverage-files: coverage/lcov.info | ||
minimum-coverage: 90 | ||
artifact-name: code-coverage-report | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
update-comment: true |
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default { | ||
parallel: 0, | ||
format: ['html:test/reports/cucumber-report.html'], | ||
paths: ['test/features'], | ||
forceExit: true | ||
format: ["json:test/reports/cucumber-report.json"], | ||
paths: ["test/features"], | ||
forceExit: true, | ||
}; |