fix(vscode): treat any unresolved bare config import as not installed… #222
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: ${{ github.ref_name != 'main' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| # ======== lint + unit tests: Linux only ======== | |
| # Nothing under test here branches on `process.platform`: the three places | |
| # that do (`detection.ts` bin names, `stacks/lint/utils.ts` platform | |
| # packages, `stacks/test/projectCoverage.ts` path casing) are only reachable | |
| # when the host *is* that platform, so a second OS would re-run identical | |
| # assertions. The Windows branches are covered by the Windows E2E job below. | |
| ut: | |
| name: UT (ubuntu-latest) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Build | |
| run: pnpm run build | |
| - name: Lint | |
| run: pnpm run lint | |
| - name: Format Check | |
| run: pnpm run fmt:check | |
| - name: Unit Test | |
| run: pnpm run test:unit | |
| # ======== E2E: Windows + macOS, no Linux ======== | |
| # These are the platforms the extension is actually used on, and the only | |
| # ones upstream rstest runs its ported VS Code suites on. Linux is excluded | |
| # deliberately: the Extension Host needs xvfb there, and inotify reports a | |
| # non-atomic file rewrite as separate truncate/write events, so fixture edits | |
| # in the watch-mode suites race the watcher in a way no user hits. Do not add | |
| # a Linux E2E job back without also making every fixture edit atomic. | |
| e2e: | |
| name: E2E (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 40 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Build | |
| run: pnpm run build | |
| # `@vscode/test-electron` downloads a full VS Code into | |
| # `packages/vscode/.vscode-test`. Cache only the immutable distribution | |
| # directories, keyed on the extension manifest (which carries | |
| # `engines.vscode`); the restore-keys fallback keeps older downloads | |
| # available while `version: 'stable'` moves forward. | |
| - name: Cache VS Code Download | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: packages/vscode/.vscode-test/vscode-* | |
| key: vscode-test-${{ runner.os }}-${{ hashFiles('packages/vscode/package.json') }} | |
| restore-keys: | | |
| vscode-test-${{ runner.os }}- | |
| # The E2E fixtures install published npm packages at test time | |
| # (e2e/setupFixtures.mjs, invoked by test:e2e), so this step needs | |
| # network access. | |
| - name: E2E Test | |
| run: pnpm run test:e2e |