Skip to content

Commit 85e1a9c

Browse files
committed
Use pnpm in ci
1 parent 6840e9c commit 85e1a9c

6 files changed

Lines changed: 66 additions & 30 deletions

File tree

.github/workflows/CreateGWRelease.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,22 @@ jobs:
2323
with:
2424
submodules: false
2525

26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
28+
with:
29+
version: 10
30+
2631
- name: "Defining node version"
27-
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
32+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2833
with:
2934
node-version-file: ".nvmrc"
35+
cache: 'pnpm'
3036

3137
- name: "Installing dependencies"
32-
run: npm install
38+
run: pnpm --dir packages/release-tools install
3339

3440
- name: "Creating GW release and MR"
35-
run: "npm run release:gw"
41+
run: "pnpm --dir packages/release-tools run release:gw"
3642
env:
3743
GH_USERNAME: ${{ secrets.GH_USERNAME }}
3844
GH_EMAIL: ${{ secrets.GH_EMAIL }}

.github/workflows/CreatePWTRelease.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,22 @@ jobs:
2323
with:
2424
submodules: false
2525

26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
28+
with:
29+
version: 10
30+
2631
- name: "Defining node version"
27-
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
32+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2833
with:
2934
node-version-file: ".nvmrc"
35+
cache: 'pnpm'
3036

3137
- name: "Installing dependencies"
32-
run: npm install
38+
run: pnpm --dir packages/release-tools install
3339

3440
- name: "Creating PWT release and MR"
35-
run: "npm run release:pwt"
41+
run: "pnpm --dir packages/release-tools run release:pwt"
3642
env:
3743
GH_USERNAME: ${{ secrets.GH_USERNAME }}
3844
GH_EMAIL: ${{ secrets.GH_EMAIL }}

.github/workflows/PublishNpm.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,39 @@ 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+
with:
23+
version: 10
24+
1925
- name: "Defining Environment Variables"
2026
id: variables
2127
run: echo "::set-output name=tag::$(git tag --points-at HEAD)"
28+
2229
- name: "Defining node version"
23-
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
30+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2431
with:
2532
node-version-file: ".nvmrc"
26-
- name: "Installing root dependencies"
27-
working-directory: ./
28-
run: npm install
33+
cache: 'pnpm'
34+
2935
- name: "Installing pluggable-widgets-tools dependencies"
3036
working-directory: ./packages/pluggable-widgets-tools
3137
if: contains(steps.variables.outputs.tag, 'pluggable-widgets-tools-v')
32-
run: npm install
38+
run: pnpm install
39+
3340
- name: "Installing generator-widget dependencies"
3441
working-directory: ./packages/generator-widget
3542
if: contains(steps.variables.outputs.tag, 'generator-widget-v')
36-
run: npm install
43+
run: pnpm install
44+
3745
- name: "Targeting Pluggable Widgets Tools"
3846
if: contains(steps.variables.outputs.tag, 'pluggable-widgets-tools-v')
3947
uses: JS-DevTools/npm-publish@0f451a94170d1699fd50710966d48fb26194d939 # v1
4048
with:
4149
package: "./packages/pluggable-widgets-tools/package.json"
4250
token: ${{ secrets.NPM_TOKEN }}
51+
4352
- name: "Targeting Pluggable Widgets Generator"
4453
if: contains(steps.variables.outputs.tag, 'generator-widget-v')
4554
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: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ jobs:
2727
with:
2828
filters: |
2929
packages:
30-
- 'packages/**/*'
30+
- 'packages/generator-widget/*'
31+
- 'packages/pluggable-widgets-tools/*'
3132
tests:
32-
- 'tests/**/*'
33+
- 'packages/command-tests/*'
3334
env:
3435
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3536

@@ -38,18 +39,30 @@ jobs:
3839
env:
3940
cache-name: cache-node-modules
4041
with:
41-
path: ~/.npm
42+
path: ~/.pnpm-store
4243
key: ${{ runner.os }}-${{ matrix.node }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
4344

45+
- name: Setup pnpm
46+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
47+
if: matrix.node == 16
48+
with:
49+
version: 8
50+
- name: Setup pnpm
51+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
52+
if: matrix.node == 18
53+
with:
54+
version: 10
55+
4456
- name: "Defining node version"
45-
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
57+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
4658
with:
4759
node-version: ${{ matrix.node == 18 && '18.15.0' || matrix.node }}
60+
cache: 'pnpm'
4861

4962
- name: "Installing dependencies"
5063
working-directory: ./
5164
if: steps.filter.outputs.packages == 'true' || steps.filter.outputs.tests == 'true'
52-
run: npm install
65+
run: pnpm --dir packages/command-tests install
5366

5467
- name: Increase number of watchers
5568
if: (steps.filter.outputs.packages == 'true' || steps.filter.outputs.tests == 'true') && startsWith(matrix.os, 'ubuntu')
@@ -58,4 +71,4 @@ jobs:
5871
- name: "Testing PWT commands"
5972
working-directory: ./
6073
if: steps.filter.outputs.packages == 'true' || steps.filter.outputs.tests == 'true'
61-
run: npm run test:pwt:commands
74+
run: pnpm --dir packages/command-tests test

.github/workflows/UnitTests.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,31 @@ jobs:
3333
env:
3434
cache-name: cache-node-modules
3535
with:
36-
path: ~/.npm
36+
path: ~/.pnpm-store
3737
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
3838

39+
- name: Setup pnpm
40+
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda #v4.1.0
41+
with:
42+
version: 10
43+
3944
- name: "Defining node version"
40-
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
45+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
4146
with:
4247
node-version-file: ".nvmrc"
48+
cache: 'pnpm'
4349

4450
- name: "Installing dependencies"
4551
working-directory: ./
4652
if: steps.filter.outputs.packages == 'true'
47-
run: npm install
48-
49-
- name: "Running pluggable-widgets-tools unit tests"
50-
working-directory: ./packages/pluggable-widgets-tools
51-
if: steps.filter.outputs.packages == 'true'
52-
run: npm run test
53+
run: pnpm -r install
5354

54-
- name: "Running generator-widget unit tests"
55-
working-directory: ./packages/generator-widget
55+
- name: "Running unit tests"
56+
working-directory: ./
5657
if: steps.filter.outputs.packages == 'true'
57-
run: npm run test
58+
run: pnpm -r test
5859

5960
- name: "Linting generator-widget"
6061
working-directory: ./packages/generator-widget
6162
if: steps.filter.outputs.packages == 'true'
62-
run: npm run lint
63+
run: pnpm run lint

0 commit comments

Comments
 (0)