mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
ci: Use blacksmith in build, lint and test workflows (#12748)
This commit is contained in:
parent
212a5bf23e
commit
323e87825e
10
.github/workflows/ci-pull-requests.yml
vendored
10
.github/workflows/ci-pull-requests.yml
vendored
|
@ -9,14 +9,16 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
install-and-build:
|
install-and-build:
|
||||||
name: Install & Build
|
name: Install & Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: blacksmith-2vcpu-ubuntu-2204
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: '--max-old-space-size=4096'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||||
|
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- uses: actions/setup-node@v4.0.2
|
- uses: useblacksmith/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
|
@ -25,7 +27,7 @@ jobs:
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Setup build cache
|
- name: Setup build cache
|
||||||
uses: rharkor/caching-for-turbo@v1.5
|
uses: useblacksmith/caching-for-turbo@v1
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
|
@ -37,7 +39,7 @@ jobs:
|
||||||
run: pnpm typecheck
|
run: pnpm typecheck
|
||||||
|
|
||||||
- name: Cache build artifacts
|
- name: Cache build artifacts
|
||||||
uses: actions/cache/save@v4.0.0
|
uses: useblacksmith/cache/save@v5
|
||||||
with:
|
with:
|
||||||
path: ./packages/**/dist
|
path: ./packages/**/dist
|
||||||
key: ${{ github.sha }}-base:build
|
key: ${{ github.sha }}-base:build
|
||||||
|
|
10
.github/workflows/linting-reusable.yml
vendored
10
.github/workflows/linting-reusable.yml
vendored
|
@ -17,14 +17,16 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: blacksmith-2vcpu-ubuntu-2204
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: '--max-old-space-size=4096'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.1
|
- uses: actions/checkout@v4.1.1
|
||||||
with:
|
with:
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
|
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- uses: actions/setup-node@v4.0.2
|
- uses: useblacksmith/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
|
@ -33,7 +35,7 @@ jobs:
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Setup build cache
|
- name: Setup build cache
|
||||||
uses: rharkor/caching-for-turbo@v1.5
|
uses: useblacksmith/caching-for-turbo@v1
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ inputs.cacheKey == '' }}
|
if: ${{ inputs.cacheKey == '' }}
|
||||||
|
@ -41,7 +43,7 @@ jobs:
|
||||||
|
|
||||||
- name: Restore cached build artifacts
|
- name: Restore cached build artifacts
|
||||||
if: ${{ inputs.cacheKey != '' }}
|
if: ${{ inputs.cacheKey != '' }}
|
||||||
uses: actions/cache/restore@v4.0.0
|
uses: useblacksmith/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
path: ./packages/**/dist
|
path: ./packages/**/dist
|
||||||
key: ${{ inputs.cacheKey }}
|
key: ${{ inputs.cacheKey }}
|
||||||
|
|
8
.github/workflows/units-tests-reusable.yml
vendored
8
.github/workflows/units-tests-reusable.yml
vendored
|
@ -38,7 +38,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
unit-test:
|
unit-test:
|
||||||
name: Unit tests
|
name: Unit tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: blacksmith-2vcpu-ubuntu-2204
|
||||||
env:
|
env:
|
||||||
TURBO_FORCE: ${{ inputs.ignoreTurboCache }}
|
TURBO_FORCE: ${{ inputs.ignoreTurboCache }}
|
||||||
COVERAGE_ENABLED: ${{ inputs.collectCoverage }}
|
COVERAGE_ENABLED: ${{ inputs.collectCoverage }}
|
||||||
|
@ -49,7 +49,7 @@ jobs:
|
||||||
|
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
- name: Use Node.js ${{ inputs.nodeVersion }}
|
- name: Use Node.js ${{ inputs.nodeVersion }}
|
||||||
uses: actions/setup-node@v4.0.2
|
uses: useblacksmith/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: ${{ inputs.nodeVersion }}
|
node-version: ${{ inputs.nodeVersion }}
|
||||||
cache: pnpm
|
cache: pnpm
|
||||||
|
@ -58,7 +58,7 @@ jobs:
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Setup build cache
|
- name: Setup build cache
|
||||||
uses: rharkor/caching-for-turbo@v1.5
|
uses: useblacksmith/caching-for-turbo@v1
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{ inputs.cacheKey == '' }}
|
if: ${{ inputs.cacheKey == '' }}
|
||||||
|
@ -66,7 +66,7 @@ jobs:
|
||||||
|
|
||||||
- name: Restore cached build artifacts
|
- name: Restore cached build artifacts
|
||||||
if: ${{ inputs.cacheKey != '' }}
|
if: ${{ inputs.cacheKey != '' }}
|
||||||
uses: actions/cache/restore@v4.0.0
|
uses: useblacksmith/cache/restore@v5
|
||||||
with:
|
with:
|
||||||
path: ./packages/**/dist
|
path: ./packages/**/dist
|
||||||
key: ${{ inputs.cacheKey }}
|
key: ${{ inputs.cacheKey }}
|
||||||
|
|
Loading…
Reference in a new issue