Skip to content

Commit 3f4ea16

Browse files
committed
✨ refactor(action): enhance action.yml with descriptive step names for clarity
1 parent 21c60f2 commit 3f4ea16

1 file changed

Lines changed: 32 additions & 7 deletions

File tree

.github/actions/setup-and-test/action.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
#
12
name: Setup and Test
23

34
description: Common setup and test steps for all workflows
45

56
runs:
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

0 commit comments

Comments
 (0)