-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
105 lines (89 loc) · 2.75 KB
/
action.yml
File metadata and controls
105 lines (89 loc) · 2.75 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#
name: Setup and Test
description: Common setup and test steps for all workflows
runs:
using: "composite"
steps:
- name: Initial Debug Show working directory and package.json
run: |
pwd && ls -al && cat package.json
shell: bash
- name: Initial Debug, Show git status and remotes
run: |
git --version && git status && git remote -v && git log --oneline --decorate --graph -n 10
shell: bash
- name: Checkout code
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
# - name: Post checkout Debug Show working directory and package.json
# run: |
# pwd && ls -al && cat package.json
# shell: bash
# - name: Post checkout Debug, Show git status and remotes
# run: git --version && git status && git remote -v && git log --oneline --decorate --graph -n 10
# shell: bash
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
# - name: Debug after pnpm action setup, Show working directory and package.json
# run: |
# pwd && ls -al && cat package.json
# shell: bash
- name: Setup CI, Build and Test Package
uses: actions/setup-node@v5
with:
node-version: "lts/*"
cache: "pnpm"
# - name: Debug post node, Show working directory and package.json
# run: |
# pwd && ls -al && cat package.json
# shell: bash
- name: Debug pnpm environment
run: |
echo "PATH: $PATH"
echo "NODE VERSION: $(node --version)"
echo "NPM VERSION: $(npm --version)"
echo "PNPM VERSION: $(pnpm --version)"
which pnpm
env | grep -E 'PNPM|NPM|NODE|PATH'
shell: bash
# - name: Debug Show working directory and package.json
# run: |
# pwd && ls -al && cat package.json
# shell: bash
- name: Install dependencies
run: pnpm install --frozen-lockfile --loglevel debug
shell: bash
# - name: Debug post install, Show working directory and package.json
# run: |
# pwd && ls -al && cat package.json
# shell: bash
- name: Run lint
run: |
if [ "$RUN_LINT" = "1" ]; then
pnpm run lint
else
echo "Skipping lint. Set RUN_LINT=1 to enable."
fi
shell: bash
- name: Run build
run: |
if [ "$RUN_BUILD" = "1" ]; then
pnpm run build
else
echo "Skipping build. Set RUN_BUILD=1 to enable."
fi
shell: bash
- name: Run tests
run: |
if [ "$RUN_TEST" = "1" ]; then
pnpm vitest --coverage --reporter=verbose
else
echo "Skipping tests. Set RUN_TEST=1 to enable."
fi
env:
SMOKE: 1
DEBUG: 1
shell: bash