mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(ci): Lint PR diffs only (#4137)
* ✨ Set up `eslint-plugin-diff` * 🔧 Fix setup * ⬆️ Upgrade `checkout` and `setup-node` * 🔧 Fix YAML * 🧪 Verify `eslint-plugin-diff` behavior * Revert "🧪 Verify `eslint-plugin-diff` behavior" This reverts commit 1fcc6c82996f89c2be88899978524b00b898ee8f. * ✏️ Fix comment
This commit is contained in:
27
.github/workflows/ci-pull-requests.yml
vendored
27
.github/workflows/ci-pull-requests.yml
vendored
@@ -13,18 +13,27 @@ jobs:
|
||||
node-version: [14.x, 16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- name: npm install, build, and test
|
||||
run: |
|
||||
npm install -g npm@latest
|
||||
npm install
|
||||
npm run build --if-present
|
||||
npm test
|
||||
npm run lint
|
||||
|
||||
- name: Install npm and dependencies
|
||||
run: npm install -g npm@latest && npm install
|
||||
|
||||
- name: Build
|
||||
run: npm run build --if-present
|
||||
|
||||
- name: Test
|
||||
run: npm run test
|
||||
|
||||
- name: Fetch base branch for `git diff`
|
||||
run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
|
||||
|
||||
- name: Run ESLint on changes only
|
||||
env:
|
||||
CI: true
|
||||
ESLINT_PLUGIN_DIFF_COMMIT: ${{ github.event.pull_request.base.ref }}
|
||||
run: npm run lint
|
||||
|
||||
Reference in New Issue
Block a user