Skip to content

Commit 8ae5aaa

Browse files
committed
feat(npm): use npm ci with setup-node's cache to stick to standards
1 parent fe0acea commit 8ae5aaa

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/typescript-library-starter.yml

+17-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
- uses: actions/setup-node@v4
1515
with:
1616
node-version-file: package.json
17-
- uses: bahmutov/npm-install@v1
17+
cache: "npm"
18+
- run: npm ci
1819

1920
lint:
2021
name: ⬣ ESLint
@@ -25,7 +26,8 @@ jobs:
2526
- uses: actions/setup-node@v4
2627
with:
2728
node-version-file: package.json
28-
- uses: bahmutov/npm-install@v1
29+
cache: "npm"
30+
- run: npm ci
2931
- name: ⬣ ESLint
3032
run: npm run lint:check
3133

@@ -38,6 +40,7 @@ jobs:
3840
- uses: actions/setup-node@v4
3941
with:
4042
node-version-file: package.json
43+
cache: "npm"
4144
- name: 🛡️ Audit
4245
run: npm audit --audit-level=high
4346

@@ -50,7 +53,8 @@ jobs:
5053
- uses: actions/setup-node@v4
5154
with:
5255
node-version-file: package.json
53-
- uses: bahmutov/npm-install@v1
56+
cache: "npm"
57+
- run: npm ci
5458
- name: 🔬 Format
5559
run: npm run format:check
5660

@@ -63,7 +67,8 @@ jobs:
6367
- uses: actions/setup-node@v4
6468
with:
6569
node-version-file: package.json
66-
- uses: bahmutov/npm-install@v1
70+
cache: "npm"
71+
- run: npm ci
6772
- name: 🈸 Spellcheck
6873
run: npm run spell:check
6974

@@ -76,7 +81,8 @@ jobs:
7681
- uses: actions/setup-node@v4
7782
with:
7883
node-version-file: package.json
79-
- uses: bahmutov/npm-install@v1
84+
cache: "npm"
85+
- run: npm ci
8086
- name: ʦ Typecheck
8187
run: npm run type:check
8288

@@ -89,7 +95,8 @@ jobs:
8995
- uses: actions/setup-node@v4
9096
with:
9197
node-version-file: package.json
92-
- uses: bahmutov/npm-install@v1
98+
cache: "npm"
99+
- run: npm ci
93100
- name: ⚡ Tests
94101
run: npm run test:coverage
95102

@@ -102,7 +109,8 @@ jobs:
102109
- uses: actions/setup-node@v4
103110
with:
104111
node-version-file: package.json
105-
- uses: bahmutov/npm-install@v1
112+
cache: "npm"
113+
- run: npm ci
106114
- name: ⚡ Tests
107115
run: npm run test:setup
108116

@@ -115,7 +123,8 @@ jobs:
115123
- uses: actions/setup-node@v4
116124
with:
117125
node-version-file: package.json
118-
- uses: bahmutov/npm-install@v1
126+
cache: "npm"
127+
- run: npm ci
119128
- name: 🔨 Build
120129
run: npm run build
121130
- name: 🚀 Release

0 commit comments

Comments
 (0)