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: 7 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,20 @@ jobs:
- name: Unit Test
run: pnpm run test:unit

# ======== E2E: Windows + macOS ========
# Windows and macOS are the platforms users run the extension on. Linux E2E
# is deliberately not run here: rstack-ecosystem-ci runs the suites on
# ubuntu-latest (rstackjs/rstack-editor#40), and for that `e2e/run.mjs`
# re-execs under `xvfb-run` when DISPLAY is unset. The old concern that
# non-atomic fixture writes race inotify on Linux was tested and did not
# reproduce (rstackjs/rstack-editor#67), so the exclusion is about CI cost,
# not correctness.
# ======== E2E: Windows + Ubuntu (PR), Windows + macOS (push main) ========
# Pull requests run ubuntu-latest instead of macos-latest to avoid long macOS
# runner queues while still covering POSIX + Windows (`e2e/run.mjs` re-execs
# under `xvfb-run` on Linux when DISPLAY is unset; the old inotify concern
# did not reproduce in rstackjs/rstack-editor#67). Pushes to `main` keep
# macos-latest + windows-latest so macOS-specific regressions are still caught.
e2e:
name: E2E (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
os: ${{ github.event_name == 'push' && fromJSON('["windows-latest", "macos-latest"]') || fromJSON('["windows-latest", "ubuntu-latest"]') }}

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ One extension replacing the standalone `rstack.rslint` and `rstack.rstest` exten
- E2E fixtures install exact versions of published npm packages (not workspace links): the extension must work against what users actually install. Renovate updates the exact toolchain pins; generated fixture lockfiles and `node_modules` remain disposable and uncommitted.
- Prefer running the E2E slice that covers the change over the full chain: `pnpm test:e2e <slice ...>` (or the `test:e2e:<slice>` aliases). Slices are declared in the `SLICES` table in `e2e/run.mjs` (name, fixtures, entry) — the package.json scripts are thin forwards and carry no slice knowledge. `RSTACK_LINT_E2E_SUITES=<name,...>` filters lint suites.
- Run E2E locally as `VSCODE_CLI=1 pnpm test:e2e <slice ...>`. Without it, the launched VS Code overwrites the extension host's `PATH` with a login-shell snapshot; on a machine whose login-shell `node` is below the runtime floor, the User Node preflight (correctly) refuses and every fmt test times out waiting for a server. CI is unaffected — its PATH `node` is new enough either way. The heavier alternative, `--force-disable-user-env` in `e2e/runTest.ts`, was deliberately not taken: it would change env fidelity for every slice.
- Linux E2E runs only in rstack-ecosystem-ci, which relies on `e2e/run.mjs` re-execing itself under `xvfb-run -a` when `DISPLAY` is unset (the whole chain runs against one X server, so `pnpm test:e2e` is the same command everywhere; `xvfb` is a prerequisite on Linux). This repo's CI runs E2E on Windows and macOS only, so the Linux path is not exercised here.
- Linux E2E relies on `e2e/run.mjs` re-execing itself under `xvfb-run -a` when `DISPLAY` is unset (the whole chain runs against one X server, so `pnpm test:e2e` is the same command everywhere; `xvfb` is a prerequisite on Linux). This repo's CI runs E2E on Windows and Ubuntu on pull requests and Windows and macOS on pushes to `main`.
- `RSTACK_E2E_TOOLCHAIN_OVERRIDES="<name>=<package dir>,…"` packs each package into `<fixture>/.toolchain/` and adds a `file:` override to every fixture's `pnpm-workspace.yaml`, so rstack-ecosystem-ci can run the suites against unreleased builds; setup fails if the lockfile still holds a registry version. Rslint needs two entries, `@rslint/core` and the host `@rslint/native-<tuple>`: core resolves its binary through `require.resolve('@rslint/native-<tuple>/bin')`, so overriding core alone would leave the published binary in place. The yaml is not restored — the env is for disposable checkouts; locally, `git checkout -- packages/vscode/e2e`. Rationale in the `setupFixtures.mjs` header.
- `VSCODE_TEST_CACHE_PATH` moves the downloaded VS Code out of `.vscode-test/`; every `runTest.ts` entry forwards it to `@vscode/test-electron`. rstack-ecosystem-ci needs it because it runs `git clean -fdxq` in the checkout before each suite, which would wipe the cache. Unset keeps the default.