Skip to content
Draft
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
28 changes: 18 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,17 @@ jobs:
name: corebridge-native-debug-${{ matrix.platform }}
path: ./packages/core-bridge/releases

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-release-override || matrix.node }}
cache: "pnpm"

# On Windows, the 'runner.temp' variable uses backslashes as path separators, but
# that may pose problems in later steps when we try to join that with subpaths;
Expand All @@ -172,25 +179,25 @@ jobs:
run: echo "dir=$(pwd)" >> ${GITHUB_OUTPUT}
working-directory: ${{ runner.temp }}

- name: Get NPM cache directory
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Get PNPM store directory
id: pnpm-cache-dir
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
- name: Restore PNPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: pnpm-main-${{ matrix.platform }}-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
npm-main-${{ matrix.platform }}-
pnpm-main-${{ matrix.platform }}-

- name: Download dependencies
# Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors :(
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile

- name: Compile code
run: npm run build -- --ignore @temporalio/core-bridge
run: pnpm run build --ignore @temporalio/core-bridge

- name: Publish to Verdaccio
run: node scripts/publish-to-verdaccio.js --registry-dir ${{ steps.tmp-dir.outputs.dir }}/npm-registry
Expand All @@ -208,7 +215,7 @@ jobs:
--headless &> ./devserver.log &

- name: Run Tests
run: npm run test
run: pnpm run test
env:
RUN_INTEGRATION_TESTS: true
REUSE_V8_CONTEXT: ${{ matrix.reuse-v8-context }}
Expand Down Expand Up @@ -272,6 +279,7 @@ jobs:

# End samples

# TODO: PNPM doesn't write logs to file by default
- name: Upload NPM logs
uses: actions/upload-artifact@v4
if: failure() || cancelled()
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/conventions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,30 @@ jobs:
with:
submodules: recursive

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Get NPM cache directory
id: npm-cache-dir
id: pnpm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-linux-x64-${{ hashFiles('./package-lock.json') }}
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: pnpm-main-linux-x64-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
npm-main-linux-x64-
pnpm-main-linux-x64-

- name: Install protoc
uses: arduino/setup-protoc@v3
Expand All @@ -56,11 +63,11 @@ jobs:

- name: Download dependencies
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile

# eslint-import-resolver-typescript requires packages to be built
- name: Compile all non-rust code
run: npm run build -- --ignore @temporalio/core-bridge
run: pnpm run build --ignore @temporalio/core-bridge

- run: npm run lint.check
- run: npm run lint.prune
- run: pnpm run lint.check
- run: pnpm run lint.prune
25 changes: 16 additions & 9 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,41 @@ jobs:
with:
submodules: recursive

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Get NPM cache directory
id: npm-cache-dir
- name: Get PNPM cache directory
id: pnpm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-linux-x64-${{ hashFiles('./package-lock.json') }}
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: pnpm-main-linux-x64-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
npm-main-linux-x64-
pnpm-main-linux-x64-

- name: Download dependencies
# Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors
# Don't build during install phase since we're going to explicitly build anyway
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
pnpm install --frozen-lockfile --ignore-scripts || pnpm install --frozen-lockfile --ignore-scripts || pnpm install --frozen-lockfile --ignore-scripts

- run: npm run build -- --ignore @temporalio/core-bridge
- run: pnpm run build --ignore @temporalio/core-bridge

- name: Build docs
run: npm run docs
run: pnpm run docs
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}

Expand Down
51 changes: 32 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,30 +165,37 @@ jobs:
mv tmp/corebridge-*/* ./
rm -rf tmp

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Get NPM cache directory
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Get PNPM cache directory
id: pnpm-cache-dir
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
- name: Restore PNPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: pnpm-main-${{ matrix.platform }}-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
npm-main-${{ matrix.platform }}-
pnpm-main-${{ matrix.platform }}-

- name: Download dependencies
# Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors :(
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile

- name: Compile code
run: npm run build -- --ignore @temporalio/core-bridge
run: pnpm run build --ignore @temporalio/core-bridge

- name: Publish to Verdaccio
run: node scripts/publish-to-verdaccio.js --registry-dir ./tmp/registry
Expand All @@ -199,13 +206,13 @@ jobs:
name: verdaccio-repo
path: ./tmp/registry/storage

- name: Save NPM cache
- name: Save PNPM cache
uses: actions/cache/save@v4
# Only saves NPM cache from the main branch, to reduce pressure on the cache (limited to 10GB).
if: ${{ env.IS_MAIN_OR_RELEASE == 'true' }}
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: pnpm-main-${{ matrix.platform }}-${{ hashFiles('./pnpm-lock.yaml') }}

# Tests that npm init @temporalio results in a working worker and client
test-npm-init:
Expand Down Expand Up @@ -254,28 +261,34 @@ jobs:
# We don't need the core submodule here since won't build the project
submodules: false

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Get NPM cache directory
id: npm-cache-dir
- name: Get PNPM cache directory
id: pnpm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: pnpm-main-${{ matrix.platform }}-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
npm-main-${{ matrix.platform }}-
pnpm-main-${{ matrix.platform }}-

# No need to compile anything, we just need the package ./scripts and their dependencies
- name: Install dependencies without compilation
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
pnpm install ---frozen-lockfile || pnpm install ---frozen-lockfile || pnpm install ---frozen-lockfile

- name: Restore Verdaccio repo artifact
uses: actions/download-artifact@v4
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,29 @@ jobs:
submodules: recursive
ref: ${{ inputs.ref }}

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: false

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Get NPM cache directory
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Get PNPM cache directory
id: pnpm-cache-dir
run: echo "dir=$(pnpm store path)" >> ${GITHUB_OUTPUT}

- name: Restore NPM cache
- name: Restore PNPM cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-linux-x64-${{ hashFiles('./package-lock.json') }}
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: pnpm-main-linux-x64-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
npm-main-linux-x64-
pnpm-main-linux-x64-

- name: Install protoc
uses: arduino/setup-protoc@v3
Expand All @@ -98,10 +105,10 @@ jobs:
- name: Download dependencies
# Make up to 3 attempts to install NPM dependencies, to work around transient NPM errors
run: |
npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose || npm ci --ignore-scripts --verbose
pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile

- name: Compile code
run: npm run build
run: pnpm run build
env:
BUILD_CORE_RELEASE: true

Expand Down
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "1.13.0",
"npmClient": "npm",
"npmClient": "pnpm",
"command": {
"publish": {
"message": "chore(release): Publish",
Expand All @@ -11,4 +11,4 @@
}
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
}
Loading
Loading