-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (32 loc) · 1.03 KB
/
node.js.yml
File metadata and controls
41 lines (32 loc) · 1.03 KB
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
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Example Tests CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Set up Node.js version 20.9.0 (minumum supported)
uses: actions/setup-node@v4
with:
node-version: 20.9.0
cache: 'npm'
- name: Install Node.js dependencies
run: npm ci
- name: Run tests in the example directory
run: npm test
working-directory: ./example
continue-on-error: true
- name: Report test results
uses: dorny/test-reporter@v1.9.1
with:
name: results
path: './example/reports/result.xml'
reporter: java-junit