Second attempt at getting test reports
This commit is contained in:
parent
5cc487a121
commit
790fe07bb0
1 changed files with 25 additions and 0 deletions
|
|
@ -44,6 +44,31 @@ stages:
|
||||||
npmLocation: $(Build.SourcesDirectory)
|
npmLocation: $(Build.SourcesDirectory)
|
||||||
testResultsFile: junit.xml
|
testResultsFile: junit.xml
|
||||||
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml
|
summaryFileLocation: $(Build.SourcesDirectory)/coverage/cobertura-coverage.xml
|
||||||
|
- stage: TestReport
|
||||||
|
displayName: Test report
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
checks: write
|
||||||
|
jobs:
|
||||||
|
build-test:
|
||||||
|
name: Build & Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3 # checkout the repo
|
||||||
|
- run: npm ci # install packages
|
||||||
|
- run: npm test # run tests (configured to use jest-junit reporter)
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
- ${{ else }}:
|
- ${{ else }}:
|
||||||
# Dev Build/Deploy
|
# Dev Build/Deploy
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue