feat(vite-plugin-angular): add OXC engine adapter for fastCompile #167
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: Angular Compiler Conformance Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - 'packages/vite-plugin-angular/src/lib/compiler/**' | |
| - 'package.json' | |
| - '.github/workflows/conformance.yml' | |
| push: | |
| branches: [beta] | |
| paths: | |
| - 'packages/vite-plugin-angular/src/lib/compiler/**' | |
| - 'package.json' | |
| - '.github/workflows/conformance.yml' | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=16384 | |
| jobs: | |
| conformance: | |
| runs-on: ubuntu-latest | |
| # OXC engine rows are advisory while it's an opt-in compiler — drift | |
| # signal without blocking PR merges. TS engine rows stay required. | |
| continue-on-error: ${{ matrix.engine == 'oxc' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| angular-major: [17, 18, 19, 20, 21, 'latest', 'next'] | |
| engine: [ts, oxc] | |
| name: Angular ${{ matrix.angular-major }} (engine=${{ matrix.engine }}) | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version-file: .node-version | |
| - run: npm install --global corepack@0.31.0 | |
| - run: corepack enable | |
| - run: pnpm --version | |
| - uses: actions/setup-node@v3 | |
| with: | |
| cache: 'pnpm' | |
| cache-dependency-path: '**/pnpm-lock.yaml' | |
| - name: Install | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Download Angular ${{ matrix.angular-major }} compliance fixtures | |
| run: bash packages/vite-plugin-angular/scripts/setup-conformance.sh ${{ matrix.angular-major }} | |
| - name: Run conformance tests | |
| env: | |
| ANGULAR_SOURCE_DIR: .angular-conformance | |
| CONFORMANCE_ENGINE: ${{ matrix.engine }} | |
| # OXC's NAPI binary crashes vitest's default isolated forks pool. | |
| # `--no-isolate` runs all spec files in a single shared worker, | |
| # which the binary survives. Identical pass rate, harmless on TS. | |
| run: pnpm exec vitest run packages/vite-plugin-angular/src/lib/compiler/conformance.spec.ts --no-isolate |