fix(detector): stop silent dependency drops in SEA mode (ESM parse, dynamic import, decorators) #585
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| # Detect whether anything outside docs-site/ changed. Docs-only PRs still | |
| # trigger the downstream jobs so their required status checks report, but | |
| # every expensive step is skipped via `if:` — the checks appear as success | |
| # in a few seconds without burning CI minutes on the full matrix. | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| code: ${{ steps.filter.outputs.code }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| code: | |
| - '!docs-site/**' | |
| # Single-purpose job that produces the build artifact test jobs consume. | |
| # Non-matrix, Linux only, so tests don't block on the slowest matrix cell | |
| # (Windows build can take 80-150s). Build output is platform-independent | |
| # compiled TS + bundled JS. | |
| build_artifact: | |
| needs: changes | |
| runs-on: ubuntu-latest | |
| steps: | |
| - if: needs.changes.outputs.code == 'true' | |
| uses: actions/checkout@v4 | |
| - if: needs.changes.outputs.code == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'yarn' | |
| - if: needs.changes.outputs.code == 'true' | |
| run: yarn install | |
| - if: needs.changes.outputs.code == 'true' | |
| run: yarn lint | |
| - if: needs.changes.outputs.code == 'true' | |
| run: yarn build | |
| - if: needs.changes.outputs.code == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-output | |
| path: | | |
| lib-es5/ | |
| prelude/sea-bootstrap.bundle.js | |
| retention-days: 1 | |
| # Sanity check: `yarn build` succeeds on every supported OS + Node combo. | |
| # Runs in parallel with tests (they don't consume this job's output) so | |
| # failures still mark the PR red without gating the test jobs. | |
| build: | |
| needs: changes | |
| strategy: | |
| fail-fast: false # prevent test to stop if one fails | |
| matrix: | |
| node-version: [22.x, 24.x] | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - if: needs.changes.outputs.code == 'true' | |
| uses: actions/checkout@v4 | |
| - if: needs.changes.outputs.code == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'yarn' | |
| - if: needs.changes.outputs.code == 'true' | |
| run: yarn install | |
| - if: needs.changes.outputs.code == 'true' | |
| run: yarn build | |
| test_host: | |
| needs: [changes, build_artifact] | |
| uses: ./.github/workflows/test.yml | |
| with: | |
| npm_command: test:host | |
| should_run: ${{ needs.changes.outputs.code }} | |
| test_22: | |
| needs: [changes, build_artifact] | |
| uses: ./.github/workflows/test.yml | |
| with: | |
| npm_command: test:22 | |
| should_run: ${{ needs.changes.outputs.code }} | |
| test_24: | |
| needs: [changes, build_artifact] | |
| uses: ./.github/workflows/test.yml | |
| with: | |
| npm_command: test:24 | |
| should_run: ${{ needs.changes.outputs.code }} |