Skip to content

Commit

Permalink
chore: change to use artefacts but extend them
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasgriffintn committed May 6, 2024
1 parent da79496 commit 6f6aff3
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/annotate-test-reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Annotate CI run with test results
on:
workflow_run:
workflows: ["Run Tests"]
types:
- completed
permissions:
contents: read

jobs:
annotate:
permissions:
checks: write

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
3 changes: 1 addition & 2 deletions .github/workflows/pr-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ permissions:
jobs:
coverage_report:
name: Generate coverage report
needs: testing
runs-on: ubuntu-latest
strategy:
matrix:
node-version: 22.x
node-version: [20.x]
steps:
- uses: actions/checkout@v4

Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ permissions:
contents: read
checks: write
pull-requests: write
actions: read
checks: write

jobs:
build:
Expand All @@ -37,16 +35,8 @@ jobs:

- name: Run Tests and Linting
run: npm run test

- name: Test Report
uses: dorny/test-reporter@v1
with:
name: Mocha Tests
path: test/reports/test-results.json
reporter: mocha-json

- name: Cucumber annotations
uses: deblockt/[email protected]
- uses: actions/upload-artifact@v3
with:
access-token: ${{ secrets.GITHUB_TOKEN }}
path: "test/reports/cucumber-report.json"
name: test-reports-${{ matrix.node-version }}
path: test/reports/

0 comments on commit 6f6aff3

Please sign in to comment.