Trying to add test report to build pipeline

This commit is contained in:
Michaela Brydon 2023-11-09 12:18:01 -05:00
parent 118bda8bf9
commit a45903700a
2 changed files with 25 additions and 2 deletions

View file

@ -247,4 +247,27 @@ stages:
userName: SafeliteAzureDevops
userEmail: githubazuredevops@safelite.com
---
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

View file

@ -11,7 +11,7 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit --coverage --ci",
"test:unit": "vue-cli-service test:unit --coverage --ci --colors",
"test:unit:lite": "vue-cli-service test:unit --ci"
},
"dependencies": {