| 1 | name: (Runtime) ESLint Plugin E2E |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main] |
| 6 | pull_request: |
| 7 | paths-ignore: |
| 8 | - compiler/** |
| 9 | |
| 10 | permissions: {} |
| 11 | |
| 12 | concurrency: |
| 13 | group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.run_id }} |
| 14 | cancel-in-progress: true |
| 15 | |
| 16 | env: |
| 17 | TZ: /usr/share/zoneinfo/America/Los_Angeles |
| 18 | |
| 19 | jobs: |
| 20 | # ----- TESTS ----- |
| 21 | test: |
| 22 | name: ESLint v${{ matrix.eslint_major }} |
| 23 | runs-on: ubuntu-latest |
| 24 | strategy: |
| 25 | fail-fast: false |
| 26 | matrix: |
| 27 | eslint_major: |
| 28 | - "6" |
| 29 | - "7" |
| 30 | - "8" |
| 31 | - "9" |
| 32 | - "10" |
| 33 | steps: |
| 34 | - uses: actions/checkout@v4 |
| 35 | with: |
| 36 | ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 37 | - uses: actions/setup-node@v4 |
| 38 | with: |
| 39 | node-version-file: '.nvmrc' |
| 40 | - name: Cache node_modules |
| 41 | uses: actions/cache@v4 |
| 42 | id: node_modules |
| 43 | with: |
| 44 | path: | |
| 45 | **/node_modules |
| 46 | key: runtime-and-compiler-eslint_e2e-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock', 'fixtures/eslint-v*/yarn.lock') }} |
| 47 | - name: Ensure clean build directory |
| 48 | run: rm -rf build |
| 49 | - run: yarn install --frozen-lockfile |
| 50 | if: steps.node_modules.outputs.cache-hit != 'true' |
| 51 | - run: yarn --cwd compiler install --frozen-lockfile |
| 52 | if: steps.node_modules.outputs.cache-hit != 'true' |
| 53 | - name: Install fixture dependencies |
| 54 | working-directory: ./fixtures/eslint-v${{ matrix.eslint_major }} |
| 55 | run: yarn --frozen-lockfile |
| 56 | if: steps.node_modules.outputs.cache-hit != 'true' |
| 57 | - name: Build plugin |
| 58 | working-directory: fixtures/eslint-v${{ matrix.eslint_major }} |
| 59 | run: node build.mjs |
| 60 | - name: Run lint test |
| 61 | working-directory: ./fixtures/eslint-v${{ matrix.eslint_major }} |
| 62 | run: yarn lint |