fix(lint): load TS configs through file URLs #1439
Workflow file for this run
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: test | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/test.yml" | |
| - "config/**" | |
| - "experimental/**" | |
| - "scripts/**" | |
| - "packages/**" | |
| - "tests/**" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| - "pnpm-workspace.yaml" | |
| concurrency: | |
| group: test-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { name: go, run: "pnpm run test:go && pnpm --filter ttsc go:vet" } | |
| # Minimal Windows safety net: the Go unit suites cover the | |
| # platform-sensitive layers (config loaders, path handling) without | |
| # the e2e runner, which is POSIX-only. Only the ttsx launcher build | |
| # is needed (test-go-lint drives real ttsx), so the full | |
| # build:current is skipped. | |
| - { | |
| name: windows-go, | |
| os: windows-latest, | |
| build: "pnpm --filter ttsc build", | |
| run: "pnpm run test:go", | |
| } | |
| - { | |
| name: shim-audit, | |
| run: "pnpm --filter ttsc shim:audit:test && pnpm --filter ttsc shim:audit", | |
| } | |
| - { | |
| name: typecheck, | |
| run: "pnpm run check:flags && pnpm run test:typecheck", | |
| } | |
| - { name: banner, run: "pnpm --filter @ttsc/test-banner start" } | |
| - { name: factory, run: "pnpm --filter @ttsc/test-factory start" } | |
| - { name: paths, run: "pnpm --filter @ttsc/test-paths start" } | |
| - { name: strip, run: "pnpm --filter @ttsc/test-strip start" } | |
| # test-lint and test-ttsc build real Go plugin binaries; those | |
| # go-binary scenarios dominate wall time and live under `src/native-plugins/` | |
| # (the fast tests stay under `src/features/`). Each lane points | |
| # `TTSC_TEST_DIR` at one subtree and trims its build to only the | |
| # packages that subtree exercises (`TTSC_BUILD_SCOPE`), skipping the | |
| # heavy @ttsc/graph build that neither suite needs. | |
| - { | |
| name: "ttsc fast", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: features, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native corpus-source", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/corpus-source, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native corpus-ttsc", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/corpus-ttsc, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native corpus-misc", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/corpus-misc, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native source-plugin", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/source-plugin, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native service", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/service, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native service-incremental", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/service-incremental, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native server", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/server, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native driver", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/driver, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native cli", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/cli, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native compiler", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/compiler, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native utility", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/utility, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "ttsc native utility-host", | |
| run: "pnpm --filter @ttsc/test-ttsc start", | |
| dir: native-plugins/utility-host, | |
| scope: test-ttsc, | |
| } | |
| - { | |
| name: "lint fast", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: features, | |
| scope: test-lint, | |
| } | |
| - { | |
| name: "lint native corpus", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: native-plugins/corpus, | |
| scope: test-lint, | |
| } | |
| - { | |
| name: "lint native corpus-2", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: native-plugins/corpus-2, | |
| scope: test-lint, | |
| } | |
| - { | |
| name: "lint native corpus-3", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: native-plugins/corpus-3, | |
| scope: test-lint, | |
| } | |
| - { | |
| name: "lint native corpus-4", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: native-plugins/corpus-4, | |
| scope: test-lint, | |
| } | |
| - { | |
| name: "lint native format", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: native-plugins/format, | |
| scope: test-lint, | |
| } | |
| - { | |
| name: "lint native config", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: native-plugins/config, | |
| scope: test-lint, | |
| } | |
| - { | |
| name: "lint native fix", | |
| run: "pnpm --filter @ttsc/test-lint start", | |
| dir: native-plugins/fix, | |
| scope: test-lint, | |
| } | |
| - { name: unplugin, run: "pnpm --filter @ttsc/test-unplugin start" } | |
| - { name: metro, run: "pnpm --filter @ttsc/test-metro start" } | |
| - { name: graph, run: "pnpm --filter @ttsc/test-graph start" } | |
| - { | |
| name: graph-bench, | |
| run: "node experimental/benchmark/graph/bench.mjs --runs=3", | |
| } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.x | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: packages/ttsc/go.mod | |
| cache-dependency-path: | | |
| packages/ttsc/go.sum | |
| packages/ttsc/tools/shim_audit/go.sum | |
| tests/go-transformer/go.mod | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.6.4 | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Use System Go For Source Plugin Tests | |
| shell: bash | |
| run: echo "TTSC_GO_BINARY=$(go env GOROOT)/bin/go" >> "$GITHUB_ENV" | |
| - name: Build Current Platform | |
| run: ${{ matrix.build || 'pnpm run build:current' }} | |
| env: | |
| # Empty (full build) for ordinary lanes; the test lanes set a scope so | |
| # build:current skips packages they never exercise (notably @ttsc/graph). | |
| TTSC_BUILD_SCOPE: ${{ matrix.scope }} | |
| - name: Run ${{ matrix.name }} | |
| run: ${{ matrix.run }} | |
| env: | |
| # Empty for ordinary lanes → the runner scans the whole suite. A test | |
| # lane points this at one subtree (`features` or `native-plugins/<category>`). | |
| TTSC_TEST_DIR: ${{ matrix.dir }} |