File tree Expand file tree Collapse file tree
.github/actions/setup-and-test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #
12name : Setup and Test
23
34description : Common setup and test steps for all workflows
45
56runs :
67 using : " composite"
78 steps :
8- - uses : actions/checkout@v4
9- - uses : actions/setup-node@v4
9+ - name : Checkout code
10+ uses : actions/checkout@v4
11+ - name : Setup CI, Build and Test Package
12+ uses : actions/setup-node@v4
1013 with :
1114 node-version : " lts/*"
12- - uses : pnpm/action-setup@v3
15+ - name : Setup pnpm
16+ uses : pnpm/action-setup@v3
1317 with :
1418 version : latest
1519 - name : Debug pnpm environment
@@ -21,11 +25,32 @@ runs:
2125 which pnpm
2226 env | grep -E 'PNPM|NPM|NODE|PATH'
2327 shell : bash
24- - run : pnpm install --frozen-lockfile
28+ - name : Install dependencies
29+ run : pnpm install --frozen-lockfile
2530 shell : bash
26- # - run: pnpm run lint
27- # - run: pnpm run build
28- - run : pnpm vitest --coverage --reporter=verbose
31+ - name : Run lint
32+ run : |
33+ if [ "$RUN_LINT" = "1" ]; then
34+ pnpm run lint
35+ else
36+ echo "Skipping lint. Set RUN_LINT=1 to enable."
37+ fi
38+ shell : bash
39+ - name : Run build
40+ run : |
41+ if [ "$RUN_BUILD" = "1" ]; then
42+ pnpm run build
43+ else
44+ echo "Skipping build. Set RUN_BUILD=1 to enable."
45+ fi
46+ shell : bash
47+ - name : Run tests
48+ run : |
49+ if [ "$RUN_TEST" = "1" ]; then
50+ pnpm vitest --coverage --reporter=verbose
51+ else
52+ echo "Skipping tests. Set RUN_TEST=1 to enable."
53+ fi
2954 env :
3055 SMOKE : 1
3156 DEBUG : 1
You can’t perform that action at this time.
0 commit comments