Repository navigation
docs: show proxy.conf.json in the client-only setup steps (#454) #152
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 compatibility | |
| on: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 6 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| page-side: | |
| name: Angular ${{ matrix.angular }} on Node.js 22 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| # The prerelease entry reports a private API rename early without failing the run. | |
| continue-on-error: ${{ matrix.prerelease == true }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # The oldest supported minor of each tested major, then each current major. The tests run | |
| # on Node.js 22 for every version: they load Angular in jsdom, not through its CLI. | |
| include: | |
| - angular: '12.2' | |
| range: '~12.2.0' | |
| # Angular 12 ships View Engine bundles that its CLI compiles for Ivy with ngcc. | |
| ngcc: true | |
| - angular: '15.2' | |
| range: '~15.2.0' | |
| - angular: '17.3' | |
| range: '~17.3.0' | |
| - angular: '19.2' | |
| range: '~19.2.0' | |
| - angular: '20.0' | |
| range: '~20.0.0' | |
| # The last 20.x minor. Several debug APIs arrive within 20.x (`ɵgetTransferState` in 20.2, | |
| # `ɵgetRouterInstance` in 20.3.5), and resource internals have no debug names until | |
| # 21.0.1, so the folded resources test is skipped here and the unfolded case runs instead. | |
| - angular: '20.3' | |
| range: '~20.3.0' | |
| - angular: '21' | |
| range: '^21.0.0' | |
| - angular: '22' | |
| range: '^22.0.0' | |
| - angular: 'next' | |
| range: 'next' | |
| prerelease: true | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup | |
| with: | |
| node-version: 22 | |
| - name: Install Angular ${{ matrix.angular }} | |
| env: | |
| RANGE: ${{ matrix.range }} | |
| # ngcc rewrites the installed files in place, so they are copied rather than linked to | |
| # the pnpm store. | |
| IMPORT_METHOD: ${{ matrix.ngcc && 'copy' || 'auto' }} | |
| run: | | |
| { | |
| echo 'overrides:' | |
| for pkg in animations common compiler core elements forms platform-browser platform-browser-dynamic platform-server router; do | |
| echo " '@angular/$pkg': '$RANGE'" | |
| done | |
| } >> pnpm-workspace.yaml | |
| pnpm install --no-frozen-lockfile --config.package-import-method="$IMPORT_METHOD" | |
| - name: Compile Angular ${{ matrix.angular }} for Ivy | |
| if: matrix.ngcc | |
| run: | | |
| version=$(node -p "require('@angular/core/package.json').version") | |
| npm install --prefix "$RUNNER_TEMP/ngcc" --no-audit --no-fund --no-save \ | |
| "@angular/compiler-cli@$version" "@angular/compiler@$version" "@angular/core@$version" \ | |
| typescript@~4.3.5 rxjs@~7.8.0 zone.js@~0.11.4 | |
| # Each package's folder in the pnpm store links its dependencies. A package is compiled | |
| # after the ones it depends on, so core and common go first. | |
| for pkg in core common compiler platform-browser platform-browser-dynamic platform-server forms router elements animations; do | |
| for dir in node_modules/.pnpm/@angular+"$pkg"@"$version"*/node_modules; do | |
| [ -d "$dir" ] || continue | |
| "$RUNNER_TEMP/ngcc/node_modules/.bin/ngcc" --source "$PWD/$dir" --properties main es2015 module --first-only | |
| done | |
| done | |
| - name: List the versions under test | |
| run: | | |
| { | |
| echo "- Node.js $(node --version)" | |
| for pkg in core common router forms platform-browser; do | |
| echo "- @angular/$pkg $(node -p "require('@angular/$pkg/package.json').version")" | |
| done | |
| } | tee -a "$GITHUB_STEP_SUMMARY" | |
| - name: Test the page side | |
| run: pnpm exec vitest run --root packages/devtools --config vitest.compat.config.ts |