Skip to content

Commit be1a6b5

Browse files
Create test-runner.yml
1 parent 48c841b commit be1a6b5

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/test-runner.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Jest
5+
on:
6+
push:
7+
pull_request:
8+
jobs:
9+
build-test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: "18"
17+
cache: "npm"
18+
- name: Install Dependencies
19+
run: npm install
20+
- name: Run tests using Jest
21+
run: npm test # run tests (configured to use jest-junit reporter)
22+
- name: Test Report
23+
uses: dorny/test-reporter@v1
24+
if: success() || failure() # run this step even if previous step failed
25+
with:
26+
name: Jest Tests # Name of the check run which will be created
27+
path: reports/jest-*.xml # Path to test results
28+
reporter: jest-junit # Format of test results

0 commit comments

Comments
 (0)