22
33on :
44 push :
5- branches : ['**']
5+ branches : ['**'] # run on pushes to all branches
66 paths :
77 - ' src/**'
88 - ' plugins/**'
1313 - ' vitest.config.js'
1414 - ' .github/workflows/**'
1515 pull_request :
16- branches : ['**']
16+ branches : ['**'] # run on PRs against any branch
1717
1818concurrency :
1919 group : ci-${{ github.ref }}
2020 cancel-in-progress : true
2121
2222jobs :
23- # Primary job: use webpack build (stable) , then test with coverage.
23+ # Primary job: format/lint, webpack build, then tests with coverage.
2424 build-and-test :
2525 runs-on : ubuntu-24.04
26- strategy :
27- fail-fast : false
28- matrix :
29- node-version : [22.x] # stick to Node 22 LTS for CI stability
3026 steps :
3127 - name : Checkout
3228 uses : actions/checkout@v4
3329
34- - name : Setup Node.js ${{ matrix.node-version }}
30+ - name : Setup Node.js (from .nvmrc)
3531 uses : actions/setup-node@v4
3632 with :
37- node-version : ${{ matrix.node-version }}
33+ node-version-file : .nvmrc
3834 cache : npm
3935
4036 - name : Install dependencies
4541 npm install
4642 fi
4743
48- - name : Check formatting
44+ - name : Prettier check
4945 run : npm run format-check
5046
47+ - name : ESLint
48+ run : npm run lint
49+
5150 # Use the webpack build for CI stability (dist via webpack)
5251 - name : Build (webpack)
5352 run : npm run build
6160 if : always()
6261 uses : actions/upload-artifact@v4
6362 with :
64- name : coverage-${{ matrix.node-version }}
63+ name : coverage
6564 path : coverage
6665 if-no-files-found : ignore
6766
@@ -74,10 +73,10 @@ jobs:
7473 - name : Checkout
7574 uses : actions/checkout@v4
7675
77- - name : Setup Node.js 22
76+ - name : Setup Node.js (from .nvmrc)
7877 uses : actions/setup-node@v4
7978 with :
80- node-version : 22.x
79+ node-version-file : .nvmrc
8180 cache : npm
8281
8382 - name : Install dependencies
0 commit comments