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
23 changes: 15 additions & 8 deletions .github/actions/setup-node-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,40 @@ outputs:
runs:
using: 'composite'
steps:
- 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: ${{ inputs.node-version }}
cache: 'pnpm'

- name: Get NPM cache directory
- name: Get PNPM store directory
id: npm-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
- name: Restore PNPM store
id: restore-cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-${{ inputs.platform }}-${{ hashFiles('./package-lock.json') }}
key: pnpm-main-${{ inputs.platform }}-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: |
npm-main-${{ inputs.platform }}-
pnpm-main-${{ inputs.platform }}-

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

- name: Save NPM cache
- name: Save PNPM store
if: inputs.save-cache == 'true'
uses: actions/cache/save@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: npm-main-${{ inputs.platform }}-${{ hashFiles('./package-lock.json') }}
key: pnpm-main-${{ inputs.platform }}-${{ hashFiles('./pnpm-lock.yaml') }}
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
working-directory: ${{ runner.temp }}

- 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 @@ -196,7 +196,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 @@ -260,13 +260,6 @@ jobs:

# End samples

- name: Upload NPM logs
uses: actions/upload-artifact@v4
if: failure() || cancelled()
with:
name: integration-tests-${{ matrix.platform }}-node${{ matrix.node }}-${{ matrix.reuse-v8-context && 'reuse' || 'noreuse' }}-logs
path: ${{ startsWith(matrix.platform, 'windows') && 'C:\\npm\\_logs\\' || '~/.npm/_logs/' }}

- name: Upload Dev Server logs
uses: actions/upload-artifact@v4
if: failure() || cancelled()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/conventions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

# 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
26 changes: 19 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,32 @@ jobs:
node-version: '22'
platform: 'linux-x64'

- 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 }}

- name: Publish docs
if: ${{ inputs.publish_target }}
- name: Publish production docs
if: ${{ inputs.publish_target == 'prod' }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
npx vercel deploy packages/docs/build \
-t '${{ secrets.VERCEL_TOKEN }}' \
pnpm dlx vercel deploy packages/docs/build \
-t "$VERCEL_TOKEN" \
--yes \
${{ inputs.publish_target == 'prod' && '--prod' || '' }}
--prod

- name: Publish preview docs
if: ${{ inputs.publish_target && inputs.publish_target != 'prod' }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
pnpm dlx vercel deploy packages/docs/build \
-t "$VERCEL_TOKEN" \
--yes
8 changes: 1 addition & 7 deletions .github/workflows/nightly-throughput-stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
with:
node-version: '22'
platform: 'linux-x64'
save-cache: 'true'

- name: Install protoc
uses: arduino/setup-protoc@v3
Expand All @@ -101,13 +102,6 @@ jobs:
env:
BUILD_CORE_RELEASE: true

- name: Save NPM cache
uses: actions/cache/save@v4
if: always()
with:
path: ${{ steps.setup-node.outputs.cache-dir }}
key: npm-main-linux-x64-${{ hashFiles('./package-lock.json') }}

- name: Install Temporal CLI
uses: temporalio/setup-temporal@v0

Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ jobs:
with:
node-version: '22'
platform: ${{ matrix.platform }}
save-cache: ${{ env.IS_MAIN_OR_RELEASE }}

- 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 @@ -188,14 +189,6 @@ jobs:
name: verdaccio-repo
path: ./tmp/registry/storage

- name: Save NPM 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.setup-node.outputs.cache-dir }}
key: npm-main-${{ matrix.platform }}-${{ hashFiles('./package-lock.json') }}

# Tests that npm init @temporalio results in a working worker and client
test-npm-init:
needs: build-packages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
save-if: ${{ env.IS_MAIN_OR_RELEASE == 'true' }}

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

Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ packages/*/CHANGELOG.md
packages/docs/docs/api
typedoc-sidebar.js
lerna.json
pnpm-lock.yaml
README.md
packages/proto/protos/root.d.ts
packages/proto/protos/json-module.js
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.2",
"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