Files
n8n-enterprise-unlocked/.github/workflows/linting-reusable.yml
कारतोफ्फेलस्क्रिप्ट™ 43e14b23b0 ci: Pin all workflow actions (#13984)
2025-03-18 13:25:17 +01:00

63 lines
1.6 KiB
YAML

name: Reusable linting workflow
on:
workflow_call:
inputs:
ref:
description: GitHub ref to lint.
required: false
type: string
default: master
cacheKey:
description: Cache key for modules and build artifacts.
required: false
default: ''
type: string
jobs:
lint:
name: Lint
runs-on: blacksmith-2vcpu-ubuntu-2204
env:
NODE_OPTIONS: '--max-old-space-size=4096'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ inputs.ref }}
- uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5
with:
node-version: 20.x
- name: Setup corepack and pnpm
run: |
npm i -g corepack@0.31
corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup build cache
uses: useblacksmith/caching-for-turbo@bafb57e7ebdbf1185762286ec94d24648cd3938a # v1
- name: Build
if: ${{ inputs.cacheKey == '' }}
run: pnpm build
- name: Restore cached build artifacts
if: ${{ inputs.cacheKey != '' }}
uses: useblacksmith/cache/restore@c5fe29eb0efdf1cf4186b9f7fcbbcbc0cf025662 # v5
with:
path: ./packages/**/dist
key: ${{ inputs.cacheKey }}
fail-on-cache-miss: true
- name: Lint Backend
run: pnpm lint:backend
- name: Lint Nodes
run: pnpm lint:nodes
- name: Lint Frontend
run: pnpm lint:frontend