Skip to content

Commit 87ade85

Browse files
committed
ci: add workflow for running the eslint plugin e2e tests
This change adds a workflow for PR builds, that runs the e2e tests for `eslint-plugin-react-hooks` created in #32396
1 parent 037b25c commit 87ade85

File tree

1 file changed

+56
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)