Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(ci): replace npm link with direct node invocation for VR CLI (#71689)

mendral-app[bot]25787400a00d
diff --git a/.github/workflows/ci-storybook.yml b/.github/workflows/ci-storybook.yml
index 5b291873c4ba..6c06a04b3df5 100644
--- a/.github/workflows/ci-storybook.yml
+++ b/.github/workflows/ci-storybook.yml
@@ -310,7 +310,7 @@ jobs:
token: ${{ github.token }}
- name: Install VR CLI
- run: cd vr-cli/products/visual_review/cli && npm ci && npm run build && npm link
+ run: cd vr-cli/products/visual_review/cli && npm ci && npm run build
- name: Create VR run
id: create
@@ -329,7 +329,7 @@ jobs:
JOB_CHECK_RUN_ID: ${{ job.check_run_id }}
run: |
# shellcheck disable=SC2086
- RUN_ID=$(vr run create \
+ RUN_ID=$(node vr-cli/products/visual_review/cli/dist/cli/src/index.js run create \
--type storybook \
--baseline frontend/snapshots.yml \
--branch "$VR_BRANCH" \
@@ -503,14 +503,14 @@ jobs:
- name: Install VR CLI
if: always() && needs.vr-setup.outputs.run_id != ''
- run: cd vr-cli/products/visual_review/cli && npm ci && npm run build && npm link
+ run: cd vr-cli/products/visual_review/cli && npm ci && npm run build
- name: Upload snapshots to Visual Review
if: always() && needs.vr-setup.outputs.run_id != ''
env:
VR_TOKEN: ${{ secrets.VR_API_TOKEN }}
run: |
- vr run upload \
+ node vr-cli/products/visual_review/cli/dist/cli/src/index.js run upload \
--run-id "${{ needs.vr-setup.outputs.run_id }}" \
--dir frontend/__snapshots__/ \
--baseline frontend/snapshots.yml \
@@ -694,7 +694,7 @@ jobs:
token: ${{ github.token }}
- name: Install VR CLI
- run: cd vr-cli/products/visual_review/cli && npm ci && npm run build && npm link
+ run: cd vr-cli/products/visual_review/cli && npm ci && npm run build
- name: Complete Visual Review run
# On master pushes the run was created with --purpose observe (tracking-only),
@@ -706,7 +706,7 @@ jobs:
env:
VR_TOKEN: ${{ secrets.VR_API_TOKEN }}
run: |
- vr run complete \
+ node vr-cli/products/visual_review/cli/dist/cli/src/index.js run complete \
--run-id "${{ needs.vr-setup.outputs.run_id }}" \
--baseline frontend/snapshots.yml \
--token "$VR_TOKEN"