build(deps-dev): bump eslint from 9.31.0 to 9.37.0 #383
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: Integration Test | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| checks: write | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - angular-version: 18 | |
| node-version: 20 | |
| os: ubuntu-latest | |
| - angular-version: 19 | |
| node-version: 20 | |
| os: ubuntu-latest | |
| - angular-version: 20 | |
| node-version: 22 | |
| os: ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Install pnpm | |
| run: npm install -g pnpm npm-check-updates | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v3 | |
| - name: 🏗 Setup node version | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - run: | | |
| pnpm install --frozen-lockfile | |
| - name: 🏗 Setup Angular Project Version ${{ matrix.angular-version }} | |
| run: | | |
| mkdir -p tmp | |
| cd tmp | |
| pnpm dlx @angular/cli@${{ matrix.angular-version }} new --create-application --package-manager=pnpm --skip-install --defaults -g -t -s -S angular${{ matrix.angular-version }} | |
| cd angular${{ matrix.angular-version }} | |
| ncu --target minor -u jasmine-core | |
| pnpm install | |
| - name: 🏗 Build Library | |
| run: | | |
| pnpm install --frozen-lockfile | |
| pnpm build | |
| mkdir -p tmp/dist | |
| cd out | |
| pnpm pack --pack-destination ../tmp/dist | |
| cd ../tmp/dist | |
| echo "LIBRARY=$(find . -mindepth 1 -print -quit)" >> $GITHUB_ENV | |
| - name: 🔗 Link Library into Angular Project Version ${{ matrix.angular-version }} | |
| run: | | |
| cd tmp/angular${{ matrix.angular-version }} | |
| pnpm config set auto-install-peers true --location project | |
| pnpm install --save ../dist/${{ env.LIBRARY }} | |
| pnpm install | |
| pnpm exec ng version | |
| - name: ✅ Add Linter configuration to angular.json into Angular Project Version ${{ matrix.angular-version }} | |
| run: | | |
| cd tmp/angular${{ matrix.angular-version }} | |
| jq -r '.projects.angular${{ matrix.angular-version }}.architect.lint = {"builder":"@krema/angular-eslint-stylelint-builder:lint","options":{"eslintFilePatterns":["src/app/*.ts"],"stylelintFilePatterns":["src/app/*.css"]}}' angular.json > angular.json.tmp | |
| mv -f angular.json.tmp angular.json | |
| - name: 🚁 Move test & config files into Angular Project Version ${{ matrix.angular-version }} | |
| run: | | |
| cp test/eslint.config.js tmp/angular${{ matrix.angular-version }} | |
| cp test/stylelint.config.js tmp/angular${{ matrix.angular-version }} | |
| rm -rf tmp/angular${{ matrix.angular-version }}/src/app/* | |
| cp test/src/* tmp/angular${{ matrix.angular-version }}/src/app | |
| cd tmp/angular${{ matrix.angular-version }}/src/app | |
| for f in *.ts.bak; do mv -- "$f" "${f%.bak}"; done | |
| for f in *.css.bak; do mv -- "$f" "${f%.bak}"; done | |
| cd - | |
| - name: 🛠️ Patch package.json for ESM in Angular <= 17 | |
| if: ${{ matrix.angular-version <= 17 }} | |
| run: | | |
| cd tmp/angular${{ matrix.angular-version }} | |
| jq '. + {"type": "module"}' package.json > package.json.tmp && mv package.json.tmp package.json | |
| - name: 🚀 Run Linter in Angular Project Version ${{ matrix.angular-version }} | |
| run: | | |
| cd tmp/angular${{ matrix.angular-version }} | |
| set +e | |
| pnpm exec ng lint > result.txt | |
| set -e | |
| cat result.txt | |
| grep -Fx "✖ 15 problems (15 errors, 0 warnings)" result.txt && echo "SUCCESS=1" >> $GITHUB_ENV || echo "SUCCESS=0" >> $GITHUB_ENV | |
| - name: Assert result | |
| if: ${{ env.SUCCESS != 1 }} | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| core.setFailed('Linter didn\'t work') |