Try to make GHA useful. Adds jest-junit

This commit is contained in:
sayhiben
2024-05-18 23:10:31 -07:00
parent 495b7d3d7e
commit 6e1e42cb25
4 changed files with 63 additions and 7 deletions

View File

@@ -1,17 +1,38 @@
name: Node.js CI
on: [push]
on:
pull_request:
push:
permissions:
contents: read
actions: read
checks: write
jobs:
build:
jest-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm install
- run: npm test
env:
CI: true
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: JEST Tests # Name of the check run which will be created
path: reports/jest-*.xml # Path to test results
reporter: jest-junit # Format of test results
- uses: ArtiomTr/jest-coverage-report-action@v2
with:
test-script: npm test