forked from ubiquity/rpc-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.09 KB
/
jest-testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Run Jest testing suite
on:
push:
branches:
- development
pull_request:
types: [opened, synchronize]
workflow_dispatch:
env:
NODE_ENV: "test"
jobs:
testing:
permissions: write-all
runs-on: ubuntu-latest
steps:
# needed to use yarn v4
- name: Enable corepack
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: "20.10.0"
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Install dependencies
run: yarn install
- name: Setup tests
run: yarn pretest
- name: Build & Run test suite
run: |
yarn test | tee ./coverage.txt && exit ${PIPESTATUS[0]}
- name: Jest Coverage Comment
# Ensures this step is run even on previous step failure (e.g. test failed)
if: always()
uses: MishaKav/jest-coverage-comment@main
with:
coverage-summary-path: coverage/coverage-summary.json
junitxml-path: junit.xml
junitxml-title: JUnit
coverage-path: ./coverage.txt