Skip to content

Commit 5d0f321

Browse files
committed
build: migrate from npm to pnpm
1 parent 47eb97a commit 5d0f321

17 files changed

Lines changed: 25088 additions & 33258 deletions

.github/actions/install/action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Install
2+
3+
description: Set up Node.js, pnpm and install dependencies
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- name: Install pnpm
9+
uses: pnpm/action-setup@v6
10+
with:
11+
version: 11
12+
- name: Install Node.js
13+
uses: actions/setup-node@v6
14+
with:
15+
node-version-file: .node-version
16+
cache: pnpm
17+
- name: Install dependencies
18+
run: pnpm install --frozen-lockfile
19+
shell: bash

.github/workflows/ci.yml

Lines changed: 24 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,29 @@ jobs:
1515
runs-on: ubuntu-latest
1616
name: Format check
1717
steps:
18-
- name: Checkout repository
19-
uses: actions/checkout@v4
18+
- name: Clone repository
19+
uses: actions/checkout@v6
2020
with:
2121
fetch-depth: 0
22-
- name: Set up Node.js
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version-file: .node-version
26-
cache: npm
2722
- name: Set base and head for Nx affected commands
28-
uses: nrwl/nx-set-shas@v4
23+
uses: nrwl/nx-set-shas@v5
2924
- name: Install dependencies
30-
run: npm ci
25+
uses: ./.github/actions/install
3126
- name: Check formatting of affected files
3227
run: npx nx format:check
3328

3429
lint:
3530
runs-on: ubuntu-latest
3631
name: Linter
3732
steps:
38-
- name: Checkout repository
39-
uses: actions/checkout@v4
33+
- name: Clone repository
34+
uses: actions/checkout@v6
4035
with:
4136
fetch-depth: 0
42-
- name: Set up Node.js
43-
uses: actions/setup-node@v4
44-
with:
45-
node-version-file: .node-version
46-
cache: npm
4737
- name: Set base and head for Nx affected commands
48-
uses: nrwl/nx-set-shas@v4
38+
uses: nrwl/nx-set-shas@v5
4939
- name: Install dependencies
50-
run: npm ci
40+
uses: ./.github/actions/install
5141
- name: Lint affected projects
5242
run: npx nx affected -t lint --parallel=3
5343

@@ -59,19 +49,14 @@ jobs:
5949
name: Unit tests
6050
runs-on: ${{ matrix.os }}
6151
steps:
62-
- name: Checkout repository
63-
uses: actions/checkout@v4
52+
- name: Clone repository
53+
uses: actions/checkout@v6
6454
with:
6555
fetch-depth: 0
66-
- name: Set up Node.js
67-
uses: actions/setup-node@v4
68-
with:
69-
node-version-file: .node-version
70-
cache: npm
7156
- name: Set base and head for Nx affected commands
72-
uses: nrwl/nx-set-shas@v4
57+
uses: nrwl/nx-set-shas@v5
7358
- name: Install dependencies
74-
run: npm ci
59+
uses: ./.github/actions/install
7560
- name: Unit test affected projects
7661
run: npx nx affected -t unit-test --parallel=3
7762

@@ -83,19 +68,14 @@ jobs:
8368
name: Integration tests
8469
runs-on: ${{ matrix.os }}
8570
steps:
86-
- name: Checkout repository
87-
uses: actions/checkout@v4
71+
- name: Clone repository
72+
uses: actions/checkout@v6
8873
with:
8974
fetch-depth: 0
90-
- name: Set up Node.js
91-
uses: actions/setup-node@v4
92-
with:
93-
node-version-file: .node-version
94-
cache: npm
9575
- name: Set base and head for Nx affected commands
96-
uses: nrwl/nx-set-shas@v4
76+
uses: nrwl/nx-set-shas@v5
9777
- name: Install dependencies
98-
run: npm ci
78+
uses: ./.github/actions/install
9979
- name: Integration test affected projects
10080
run: npx nx affected -t int-test --parallel=3
10181

@@ -107,39 +87,29 @@ jobs:
10787
name: E2E tests
10888
runs-on: ${{ matrix.os }}
10989
steps:
110-
- name: Checkout repository
111-
uses: actions/checkout@v4
90+
- name: Clone repository
91+
uses: actions/checkout@v6
11292
with:
11393
fetch-depth: 0
114-
- name: Set up Node.js
115-
uses: actions/setup-node@v4
116-
with:
117-
node-version-file: .node-version
118-
cache: npm
11994
- name: Set base and head for Nx affected commands
120-
uses: nrwl/nx-set-shas@v4
95+
uses: nrwl/nx-set-shas@v5
12196
- name: Install dependencies
122-
run: npm ci
97+
uses: ./.github/actions/install
12398
- name: E2E test affected projects
12499
run: npx nx affected -t e2e-test --parallel=1
125100

126101
build:
127102
runs-on: ubuntu-latest
128103
name: Build
129104
steps:
130-
- name: Checkout repository
131-
uses: actions/checkout@v4
105+
- name: Clone repository
106+
uses: actions/checkout@v6
132107
with:
133108
fetch-depth: 0
134-
- name: Set up Node.js
135-
uses: actions/setup-node@v4
136-
with:
137-
node-version-file: .node-version
138-
cache: npm
139109
- name: Set base and head for Nx affected commands
140-
uses: nrwl/nx-set-shas@v4
110+
uses: nrwl/nx-set-shas@v5
141111
- name: Install dependencies
142-
run: npm ci
112+
uses: ./.github/actions/install
143113
- name: Build all projects # affected is not used to be able to test-releae packages
144114
run: npx nx run-many --target=build --parallel=3
145115
- name: Test-release packages

.github/workflows/code-pushup-fork.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,14 @@ jobs:
2323
name: Standalone mode (fork)
2424
if: github.event.pull_request.head.repo.fork
2525
steps:
26-
- name: Checkout repository
27-
uses: actions/checkout@v4
26+
- name: Clone repository
27+
uses: actions/checkout@v6
2828
with:
2929
fetch-depth: 0
30-
- name: Set up Node.js
31-
uses: actions/setup-node@v4
32-
with:
33-
node-version-file: .node-version
34-
cache: npm
3530
- name: Set base and head for Nx affected commands
36-
uses: nrwl/nx-set-shas@v4
31+
uses: nrwl/nx-set-shas@v5
3732
- name: Install dependencies
38-
run: npm ci
33+
uses: ./.github/actions/install
3934
- name: Run Code PushUp action
4035
uses: ./.github/actions/code-pushup
4136
with:
@@ -47,19 +42,14 @@ jobs:
4742
name: Monorepo mode (fork)
4843
if: github.event.pull_request.head.repo.fork
4944
steps:
50-
- name: Checkout repository
51-
uses: actions/checkout@v4
45+
- name: Clone repository
46+
uses: actions/checkout@v6
5247
with:
5348
fetch-depth: 0
54-
- name: Set up Node.js
55-
uses: actions/setup-node@v4
56-
with:
57-
node-version-file: .node-version
58-
cache: npm
5949
- name: Set base and head for Nx affected commands
60-
uses: nrwl/nx-set-shas@v4
50+
uses: nrwl/nx-set-shas@v5
6151
- name: Install dependencies
62-
run: npm ci
52+
uses: ./.github/actions/install
6353
- name: Run Code PushUp action
6454
uses: ./.github/actions/code-pushup
6555
with:

.github/workflows/code-pushup.yml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,14 @@ jobs:
2222
env:
2323
CP_API_KEY: ${{ secrets.CP_API_KEY }}
2424
steps:
25-
- name: Checkout repository
26-
uses: actions/checkout@v4
25+
- name: Clone repository
26+
uses: actions/checkout@v6
2727
with:
2828
fetch-depth: 0
29-
- name: Set up Node.js
30-
uses: actions/setup-node@v4
31-
with:
32-
node-version-file: .node-version
33-
cache: npm
3429
- name: Set base and head for Nx affected commands
35-
uses: nrwl/nx-set-shas@v4
30+
uses: nrwl/nx-set-shas@v5
3631
- name: Install dependencies
37-
run: npm ci
32+
uses: ./.github/actions/install
3833
- name: Run Code PushUp action
3934
uses: ./.github/actions/code-pushup
4035
with:
@@ -49,19 +44,14 @@ jobs:
4944
env:
5045
CP_API_KEY: ${{ secrets.CP_API_KEY }}
5146
steps:
52-
- name: Checkout repository
53-
uses: actions/checkout@v4
47+
- name: Clone repository
48+
uses: actions/checkout@v6
5449
with:
5550
fetch-depth: 0
56-
- name: Set up Node.js
57-
uses: actions/setup-node@v4
58-
with:
59-
node-version-file: .node-version
60-
cache: npm
6151
- name: Set base and head for Nx affected commands
62-
uses: nrwl/nx-set-shas@v4
52+
uses: nrwl/nx-set-shas@v5
6353
- name: Install dependencies
64-
run: npm ci
54+
uses: ./.github/actions/install
6555
- name: Run Code PushUp action
6656
uses: ./.github/actions/code-pushup
6757
with:

.github/workflows/coverage.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ jobs:
1313
name: List packages
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Checkout the repository
17-
uses: actions/checkout@v4
18-
- name: Set up Node.js
19-
uses: actions/setup-node@v4
20-
with:
21-
node-version-file: .node-version
22-
cache: npm
16+
- name: Clone repository
17+
uses: actions/checkout@v6
2318
- name: Install dependencies
24-
run: npm ci
19+
uses: ./.github/actions/install
2520
- name: List packages using Nx CLI
2621
id: list-packages
2722
run: |
@@ -38,15 +33,10 @@ jobs:
3833
name: Collect coverage
3934
runs-on: ubuntu-latest
4035
steps:
41-
- name: Checkout the repository
42-
uses: actions/checkout@v4
43-
- name: Set up Node.js
44-
uses: actions/setup-node@v4
45-
with:
46-
node-version-file: .node-version
47-
cache: npm
36+
- name: Clone repository
37+
uses: actions/checkout@v6
4838
- name: Install dependencies
49-
run: npm ci
39+
uses: ./.github/actions/install
5040
- name: Execute tests with coverage
5141
run: npx nx run ${{ matrix.project }}:${{ matrix.target }}
5242
- name: Upload coverage reports to Codecov

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
name: Scan new dependencies
1313
steps:
1414
- name: Clone repository
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v6
1616
- name: Check for vulnerabilities in new dependencies
17-
uses: actions/dependency-review-action@v4
17+
uses: actions/dependency-review-action@v5
1818
with:
1919
comment-summary-in-pr: on-failure

.github/workflows/git-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Clone repository
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v6
1414
- name: Block fixup commit merge
1515
uses: 13rac1/block-fixup-merge-action@v2.0.0

.github/workflows/pr-commitlint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
name: Check PR title
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout the repository
13-
uses: actions/checkout@v4
12+
- name: Clone repository
13+
uses: actions/checkout@v6
1414
- name: Install dependencies
15-
run: npm ci
15+
uses: ./.github/actions/install
1616
- name: Check PR title with commitlint
1717
run: echo "${{ github.event.pull_request.title }}" | npx commitlint

.github/workflows/pr-labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
pull-requests: write
1414
issues: write
1515
steps:
16-
- name: Checkout the repository
17-
uses: actions/checkout@v4
18-
- uses: actions/labeler@v5
16+
- name: Clone repository
17+
uses: actions/checkout@v6
18+
- uses: actions/labeler@v6
1919
with:
2020
repo-token: '${{ secrets.GITHUB_TOKEN }}'
2121
sync-labels: true

.github/workflows/publish.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,15 @@ jobs:
2626
environment: release
2727
steps:
2828
- name: Clone the repository
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
3232
- name: Configure Git user
3333
# https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token
3434
run: |
3535
git config user.name github-actions[bot]
3636
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
37-
- name: Set up Node.js
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version-file: .node-version
41-
cache: npm
4237
- name: Install dependencies
43-
run: npm ci
38+
uses: ./.github/actions/install
4439
- name: Publish packages to npm
4540
run: npx nx release publish

0 commit comments

Comments
 (0)