diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45228dca4..54479c508 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -819,21 +819,22 @@ jobs: node-version: ${{ matrix.node == '24' && env.NODE_VERSION_24 || matrix.node == '20' && env.NODE_VERSION_20 || env.NODE_VERSION_22 }} - name: Smoke test (Node.js) env: - # Clear auth tokens so the CLI doesn't attempt API calls or - # telemetry uploads during the smoke test. On main, the job - # inherits SENTRY_AUTH_TOKEN from the `production` environment - # (needed by the Bundle step); without clearing it here, the - # CLI tries to initialize telemetry → SQLite, which crashes on - # the WASM fallback path (Node 20) because the runner's home - # directory may not have a writable ~/.sentry config dir yet. + # Clear auth tokens — on main the job inherits SENTRY_AUTH_TOKEN + # from the production environment (for the Bundle step's sourcemap + # upload). The smoke tests must not use it. SENTRY_AUTH_TOKEN: "" SENTRY_TOKEN: "" + # Use a temp config dir so the WASM SQLite driver (Node 20) can + # create and open the database reliably. The runner's ~/.sentry + # may not exist under the switched Node 20 runtime. + SENTRY_CONFIG_DIR: ${{ runner.temp }}/.sentry-smoke run: node dist/bin.cjs --help - name: Smoke test (Node.js — deep) shell: bash env: SENTRY_AUTH_TOKEN: "" SENTRY_TOKEN: "" + SENTRY_CONFIG_DIR: ${{ runner.temp }}/.sentry-smoke run: | # auth status without a token exercises SQLite init, schema # migrations, telemetry lazy import, and the CJS require chain.