-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.28 KB
/
nodejs.yml
File metadata and controls
55 lines (51 loc) · 1.28 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on:
workflow_call:
inputs:
run-tests:
type: boolean
default: true
node-versions:
type: string
default: "[\"18.x\", \"19.x\", \"20.x\", \"22.x\"]"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJSON(inputs.node-versions) }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: npm i -g pnpm
- name: Install
run: pnpm i
- name: Build
run: pnpm run build
- name: Lint
run: pnpm run lint
- name: Test
run: pnpm run test
if: inputs.run-tests
env:
FORCE_COLOR: 1
- name: Upload Test Results Node.js ${{ matrix.node-version }}
if: matrix.node-version == '20.x'
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: Test Results
path: junit.xml
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}