chore(deps): update angular-cli monorepo to v21.2.8 (#2174) #11366
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: [master] | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| workflow_dispatch: | |
| inputs: | |
| release_type: | |
| description: 'Release type' | |
| required: true | |
| default: 'beta' | |
| type: choice | |
| options: [beta, graduate] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| if: github.event_name == 'workflow_dispatch' || (!contains(github.event.head_commit.message, 'ci(release)')) | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.discover.outputs.matrix }} | |
| has_tests: ${{ steps.discover.outputs.has_tests }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - run: git fetch origin master:master || true | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - run: corepack enable | |
| - uses: actions/cache@v5 | |
| id: deps-cache | |
| with: | |
| path: | | |
| node_modules | |
| .yarn | |
| ~/.cache/Cypress | |
| ~/.cache/puppeteer | |
| key: deps-${{ runner.os }}-node${{ hashFiles('.nvmrc') }}-${{ hashFiles('yarn.lock') }} | |
| restore-keys: deps-${{ runner.os }}-node${{ hashFiles('.nvmrc') }}- | |
| - uses: actions/cache@v5 | |
| if: steps.deps-cache.outputs.cache-hit != 'true' | |
| with: | |
| path: ~/.cache | |
| key: yarn-dl-${{ runner.os }}-${{ hashFiles('yarn.lock') }} | |
| restore-keys: yarn-dl-${{ runner.os }}- | |
| - run: yarn --immutable | |
| # Ensure Puppeteer Chrome binary is downloaded (needed for Karma tests in integration jobs) | |
| # Puppeteer downloads Chrome on first use, so we trigger it here to include it in cache | |
| - run: | | |
| for app in examples/custom-webpack/*/; do | |
| if [ -f "$app/package.json" ] && grep -q "puppeteer" "$app/package.json"; then | |
| (cd "$app" && node -e "try { require('puppeteer').executablePath(); } catch(e) {}" || true) | |
| fi | |
| done | |
| # On PRs, build only affected packages unless 'ci:full' label is present. | |
| # On master events (push/workflow_dispatch), build all packages. (see #2026) | |
| - run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ] && [ "${{ contains(github.event.pull_request.labels.*.name, 'ci:full') }}" != "true" ]; then | |
| yarn build:packages | |
| else | |
| yarn build:packages:all | |
| fi | |
| - id: discover | |
| run: | | |
| MATRIX=$(node scripts/discover-tests.js) | |
| echo "matrix=$MATRIX" >> $GITHUB_OUTPUT | |
| TEST_COUNT=$(echo "$MATRIX" | jq '.include | length') | |
| if [ "$TEST_COUNT" -gt 0 ]; then | |
| echo "has_tests=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "has_tests=false" >> $GITHUB_OUTPUT | |
| fi | |
| echo "Test count: $TEST_COUNT" | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: dist | |
| path: packages/*/dist | |
| integration: | |
| needs: build | |
| if: needs.build.outputs.has_tests == 'true' | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.build.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - run: corepack enable | |
| - uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| node_modules | |
| .yarn | |
| ~/.cache/Cypress | |
| ~/.cache/puppeteer | |
| key: deps-${{ runner.os }}-node${{ hashFiles('.nvmrc') }}-${{ hashFiles('yarn.lock') }} | |
| fail-on-cache-miss: true | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: dist | |
| path: packages | |
| - run: sudo apt-get update && sudo apt-get install -y xvfb | |
| - name: ${{ matrix.purpose }} | |
| run: | | |
| Xvfb :99 & | |
| export DISPLAY=:99 | |
| cd ${{ matrix.app }} | |
| ${{ matrix.command }} | |
| ci-pass: | |
| needs: [build, integration] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: | | |
| if [ "${{ needs.build.result }}" != "success" ]; then | |
| echo "Build failed or was cancelled" | |
| exit 1 | |
| fi | |
| if [ "${{ needs.integration.result }}" != "success" ] && [ "${{ needs.integration.result }}" != "skipped" ]; then | |
| echo "Integration tests failed or were cancelled" | |
| exit 1 | |
| fi | |
| publish: | |
| needs: [build, integration] | |
| if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.GH_PERSONAL_TOKEN }} | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| registry-url: 'https://registry.npmjs.org' | |
| - run: corepack enable | |
| - uses: actions/cache/restore@v5 | |
| with: | |
| path: | | |
| node_modules | |
| .yarn | |
| ~/.cache/Cypress | |
| ~/.cache/puppeteer | |
| key: deps-${{ runner.os }}-node${{ hashFiles('.nvmrc') }}-${{ hashFiles('yarn.lock') }} | |
| fail-on-cache-miss: true | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: dist | |
| path: packages | |
| - name: Publish | |
| run: | | |
| git config --global user.name ${{ secrets.GIT_USER }} | |
| git config --global user.email ${{ secrets.GIT_EMAIL }} | |
| if [ "${{ github.event.inputs.release_type }}" == "graduate" ]; then | |
| npm run graduate -- --yes | |
| else | |
| bash scripts/default-registry.sh | |
| fi |