Skip to content

Commit 7163d83

Browse files
committed
Use pnpm in ci
1 parent 1d83643 commit 7163d83

6 files changed

Lines changed: 34 additions & 18 deletions

File tree

.github/workflows/CreateGWRelease.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ jobs:
2323
with:
2424
submodules: false
2525

26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
28+
2629
- name: "Defining node version"
2730
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
2831
with:
2932
node-version-file: ".nvmrc"
33+
cache: 'pnpm'
3034

3135
- name: "Installing dependencies"
3236
run: pnpm --dir packages/release-tools install

.github/workflows/CreatePWTRelease.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@ jobs:
2323
with:
2424
submodules: false
2525

26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
28+
2629
- name: "Defining node version"
2730
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
2831
with:
2932
node-version-file: ".nvmrc"
33+
cache: 'pnpm'
3034

3135
- name: "Installing dependencies"
3236
run: pnpm --dir packages/release-tools install

.github/workflows/PublishNpm.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,37 @@ jobs:
1616
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
1717
with:
1818
submodules: false
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
22+
1923
- name: "Defining Environment Variables"
2024
id: variables
2125
run: echo "::set-output name=tag::$(git tag --points-at HEAD)"
26+
2227
- name: "Defining node version"
2328
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
2429
with:
2530
node-version-file: ".nvmrc"
26-
- name: "Installing root dependencies"
27-
working-directory: ./
28-
run: npm install
31+
cache: 'pnpm'
32+
2933
- name: "Installing pluggable-widgets-tools dependencies"
3034
working-directory: ./packages/pluggable-widgets-tools
3135
if: contains(steps.variables.outputs.tag, 'pluggable-widgets-tools-v')
32-
run: npm install
36+
run: pnpm install
37+
3338
- name: "Installing generator-widget dependencies"
3439
working-directory: ./packages/generator-widget
3540
if: contains(steps.variables.outputs.tag, 'generator-widget-v')
36-
run: npm install
41+
run: pnpm install
42+
3743
- name: "Targeting Pluggable Widgets Tools"
3844
if: contains(steps.variables.outputs.tag, 'pluggable-widgets-tools-v')
3945
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1
4046
with:
4147
package: "./packages/pluggable-widgets-tools/package.json"
4248
token: ${{ secrets.NPM_TOKEN }}
49+
4350
- name: "Targeting Pluggable Widgets Generator"
4451
if: contains(steps.variables.outputs.tag, 'generator-widget-v')
4552
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1

.github/workflows/ShaCheck.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 # v2
1616
with:
1717
submodules: false
18+
1819
- name: "Ensure SHA pinned actions"
1920
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@0b552a197e44b819629237e065d781f5ca691460 # v1.1.1
2021
with:

.github/workflows/TestPWTCommands.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,16 @@ jobs:
3939
env:
4040
cache-name: cache-node-modules
4141
with:
42-
path: ~/.npm
42+
path: ~/.pnpm-store
4343
key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
4444

45+
- name: Setup pnpm
46+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
4547
- name: "Defining node version"
4648
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
4749
with:
4850
node-version: ${{ matrix.node == 18 && '18.15.0' || matrix.node }}
51+
cache: 'pnpm'
4952

5053
- name: "Installing dependencies"
5154
working-directory: ./

.github/workflows/UnitTests.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,32 @@ jobs:
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3030

31-
# TODO: Do we need to do anything special for pnpm caching?
3231
- name: "Defining cache"
3332
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4
3433
env:
3534
cache-name: cache-node-modules
3635
with:
37-
path: ~/.npm
36+
path: ~/.pnpm-store
3837
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
3938

39+
- name: Setup pnpm
40+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
41+
4042
- name: "Defining node version"
4143
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
4244
with:
4345
node-version-file: ".nvmrc"
46+
cache: 'pnpm'
4447

4548
- name: "Installing dependencies"
4649
working-directory: ./
4750
if: steps.filter.outputs.packages == 'true'
48-
run: pnpm install
49-
50-
# TODO: Can we manage this centrally with pnpm?
51-
- name: "Running pluggable-widgets-tools unit tests"
52-
working-directory: ./packages/pluggable-widgets-tools
53-
if: steps.filter.outputs.packages == 'true'
54-
run: pnpm test
51+
run: pnpm -r install
5552

56-
- name: "Running generator-widget unit tests"
57-
working-directory: ./packages/generator-widget
53+
- name: "Running unit tests"
54+
working-directory: ./
5855
if: steps.filter.outputs.packages == 'true'
59-
run: pnpm test
56+
run: pnpm -r test
6057

6158
- name: "Linting generator-widget"
6259
working-directory: ./packages/generator-widget

0 commit comments

Comments
 (0)