Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/actions/setup-node-and-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Setup Node and pnpm
description: Install the repository pnpm version and the latest Node LTS

inputs:
cache:
description: Whether this job owns the pnpm cache write
required: true

runs:
using: composite
steps:
- uses: pnpm/setup@v2
with:
runtime: node@lts
install: false
cache: ${{ inputs.cache }}
12 changes: 3 additions & 9 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,10 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Setup pnpm and Node
uses: ./.github/actions/setup-node-and-pnpm
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: 'lts/*'
check-latest: true
cache: pnpm
cache: false # PR CI owns cache writes when both workflows run.
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ jobs:
fetch-depth: 0
- uses: nrwl/nx-set-shas@v5
name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: pnpm/action-setup@v6
- uses: ./.github/actions/setup-node-and-pnpm
with:
run_install: false
- uses: actions/setup-node@v5
with:
node-version: 'lts/*'
check-latest: true
cache: pnpm
cache: false # Release owns cache writes on release branches.
- run: pnpm install --frozen-lockfile
- run: pnpm nx affected --target=build --parallel=2
- run: pnpm nx affected --target=test --parallel=2
27 changes: 6 additions & 21 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ jobs:
persist-credentials: false
- uses: nrwl/nx-set-shas@v5
name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: pnpm/action-setup@v6
- uses: ./.github/actions/setup-node-and-pnpm
with:
run_install: false
- uses: actions/setup-node@v5
with:
node-version: 'lts/*'
check-latest: true
package-manager-cache: false
cache: false
- run: pnpm install --frozen-lockfile
- run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: pnpm nx affected --target=format:check --parallel=2
Expand All @@ -49,14 +44,9 @@ jobs:
persist-credentials: false
- uses: nrwl/nx-set-shas@v5
name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: pnpm/action-setup@v6
with:
run_install: false
- uses: actions/setup-node@v5
- uses: ./.github/actions/setup-node-and-pnpm
with:
node-version: 'lts/*'
check-latest: true
cache: pnpm
cache: true
- run: pnpm install --frozen-lockfile
- run: pnpm nx affected --target=build --parallel=3
- run: pnpm nx affected --target=test --parallel=2
Expand All @@ -76,14 +66,9 @@ jobs:
persist-credentials: false
- uses: nrwl/nx-set-shas@v5
name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: pnpm/action-setup@v6
with:
run_install: false
- uses: actions/setup-node@v5
- uses: ./.github/actions/setup-node-and-pnpm
with:
node-version: 'lts/*'
check-latest: true
cache: pnpm
cache: true
- name: 'Create E2E env file'
run: |
echo FORGE_EMAIL=${{ vars.FORGE_EMAIL }} >> e2e/nx-forge-e2e/.env
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,10 @@ jobs:
uses: actions/checkout@v5
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Setup pnpm and Node
uses: ./.github/actions/setup-node-and-pnpm
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: 'lts/*'
check-latest: true
cache: pnpm
cache: false # Release owns cache writes when both workflows run.
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@ jobs:
name: Checkout [main]
with:
fetch-depth: 0
- uses: pnpm/action-setup@v6
- uses: ./.github/actions/setup-node-and-pnpm
name: Setup pnpm and Node.js
with:
run_install: false
- uses: actions/setup-node@v5
name: Setup Node.js
with:
node-version: 'lts/*'
check-latest: true
cache: pnpm
cache: true
- name: 'Create E2E env file'
run: |
echo FORGE_EMAIL=${{ vars.FORGE_EMAIL }} >> e2e/nx-forge-e2e/.env
Expand Down