ci: Refactor linting workflow (no-changelog) (#9714)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-13 13:10:51 +02:00
committed by GitHub
parent cfef49e60a
commit ab29ba9b58
5 changed files with 77 additions and 62 deletions

View File

@@ -3,7 +3,7 @@ name: Build, unit test and lint branch
on: [pull_request]
jobs:
install:
install-and-build:
name: Install & Build
runs-on: ubuntu-latest
steps:
@@ -36,35 +36,15 @@ jobs:
unit-test:
name: Unit tests
uses: ./.github/workflows/units-tests-reusable.yml
needs: install
needs: install-and-build
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
cacheKey: ${{ github.sha }}-base:build
lint:
name: Lint changes
runs-on: ubuntu-latest
needs: install
steps:
- uses: actions/checkout@v4.1.1
with:
repository: n8n-io/n8n
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- run: corepack enable
- uses: actions/setup-node@v4.0.2
with:
node-version: 20.x
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Restore cached build artifacts
uses: actions/cache/restore@v4.0.0
with:
path: ./packages/**/dist
key: ${{ github.sha }}-base:build
- name: Lint
run: pnpm lint
name: Lint
uses: ./.github/workflows/linting-reusable.yml
needs: install-and-build
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
cacheKey: ${{ github.sha }}-base:build