-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (41 loc) · 1.07 KB
/
test-nodejs.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
47
48
49
50
name: Test Node.js
on:
push:
branches:
- main
pull_request:
branches:
- main
- 'feature/**'
workflow_dispatch:
inputs:
enable_terminal:
type: boolean
description: 'Enable terminal session.'
required: false
default: false
jobs:
test-nodejs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20, 22]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Check coding standards
run: npm run lint
continue-on-error: ${{ vars.CI_LINT_IGNORE_FAILURE == '1' }}
- name: Run tests
run: npm run test
continue-on-error: ${{ vars.CI_TEST_IGNORE_FAILURE == '1' }}
- name: Setup tmate session
if: ${{ !cancelled() && github.event.inputs.enable_terminal == 'true' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 5