File tree Expand file tree Collapse file tree 2 files changed +47
-11
lines changed
Expand file tree Collapse file tree 2 files changed +47
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Setup
3+ description : Setup the environment for the project
4+
5+ inputs :
6+ node-version :
7+ description : Node.js version
8+ default : ' 24'
9+ required : false
10+ node-registry :
11+ description : Node.js package registry to set up for auth
12+ required : false
13+
14+ runs :
15+ using : composite
16+ steps :
17+ - name : Install Node.js
18+ uses : actions/setup-node@v5
19+ with :
20+ node-version : ${{ inputs.node-version }}
21+ registry-url : ${{ inputs.node-registry }}
22+
23+ - name : Install pnpm
24+ uses : pnpm/action-setup@v4
25+
26+ - name : Get pnpm store directory
27+ id : pnpm-cache-dir
28+ shell : bash
29+ run : echo "dir=$(pnpm store path)" >> $GITHUB_OUTPUT
30+
31+ - name : Setup pnpm cache
32+ uses : actions/cache@v4
33+ with :
34+ path : ${{ steps.pnpm-cache-dir.outputs.dir }}
35+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+ restore-keys : |
37+ ${{ runner.os }}-pnpm-store-
38+
39+ - name : Install dependencies
40+ shell : bash
41+ run : pnpm install --prefer-frozen-lockfile
Original file line number Diff line number Diff line change 1+ ---
12name : Unit Test
23
34on :
45 push :
56 branches : [main]
67 pull_request :
78 branches : [main]
9+ workflow_dispatch :
810
911jobs :
1012 test :
1113 runs-on : ubuntu-latest
1214 steps :
1315 - name : Checkout
14- uses : actions/checkout@v4
16+ uses : actions/checkout@v5
1517
16- - name : Install pnpm
17- 18-
19- - name : Set node LTS
20- uses : actions/setup-node@v4
18+ - name : Setup
19+ uses : ./.github/actions/setup
2120 with :
22- node-version : lts/*
23- cache : pnpm
24-
25- - name : Install
26- run : pnpm install
21+ node-registry : https://registry.npmjs.org
2722
2823 - name : Build
2924 run : pnpm run build
You can’t perform that action at this time.
0 commit comments