[pull] master from codecombat:master #1020
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: ESLint CI | |
| # Triggering workflow on all push | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: ESLint CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.19.2 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: CYPRESS_INSTALL_BINARY=0 npm ci # OR: yarn | |
| - name: Fetch the base branch, so we can use `git diff` | |
| run: git fetch origin ${{ github.event.pull_request.base.sha }}:${{ github.event.pull_request.base.sha }} | |
| - name: Fetch the head branch, so we can use `git diff` | |
| run: git fetch origin ${{ github.event.pull_request.head.sha }}:${{ github.event.pull_request.head.sha }} | |
| - name: Run eslint on changed files | |
| run: npx @automattic/eslint-changed --git --git-base ${{ github.event.pull_request.base.sha }} --in-diff-only --debug --ext .js,.vue |