-
Notifications
You must be signed in to change notification settings - Fork 107
62 lines (50 loc) · 1.62 KB
/
Copy pathbuild-node.yml
File metadata and controls
62 lines (50 loc) · 1.62 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
56
57
58
59
60
61
62
name: Continuous Integration - Node Package
on:
workflow_call:
inputs:
# Counterintuitive, but this is the value for full history required for rev-list --count
fetch-depth:
default: 0
required: false
type: number
jobs:
ci-test-node:
name: Perform Node CI Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["22", "24"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: ${{ inputs.fetch-depth }}
- uses: oven-sh/setup-bun@v2
- name: Cache Node Packages
id: cache-node
uses: actions/cache@v4
with:
path: _packages/node/node_modules
key: ${{ runner.os }}-build-ci-node-yarn-${{ matrix.node-version }}-${{ hashFiles('_packages/node/yarn.lock') }}
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache-dependency-path: _packages/node/yarn.lock
registry-url: https://registry.npmjs.org/
- name: Install dependencies
working-directory: ./_packages/node
run: bun install
- name: Perform a Build
working-directory: ./_packages/node
run: bun run build
- name: Run Package Tests
working-directory: ./_packages/node
run: bun run test
- name: Package Node Artifact
working-directory: ./_packages/node
run: bun pm pack
- name: Archive Node Package Artifacts
uses: actions/upload-artifact@v4
with:
name: package-node-${{ matrix.node-version }}
path: _packages/node/*.tgz