-
Notifications
You must be signed in to change notification settings - Fork 18
39 lines (31 loc) · 833 Bytes
/
unit.yml
File metadata and controls
39 lines (31 loc) · 833 Bytes
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
name: Unit tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
node-version:
required: false
default: "22.x"
# Only one pull-request triggered run should be executed at a time
# (head_ref is only set for PR events, otherwise fallback to run_id which differs for every run).
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ inputs.node-version }}
- name: Install project
run: |
npm install
- name: Run tests
run: |
npm run test