forked from n8n-io/n8n
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Parallelize unit tests on the CI (no-changelog)
- Loading branch information
Showing
12 changed files
with
200 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: 'Build n8n' | ||
description: 'Build n8n and cache the dist folder' | ||
inputs: | ||
ref: | ||
description: 'GitHub ref to build' | ||
required: true | ||
type: string | ||
cacheKey: | ||
description: 'Cache key for modules and build artifacts' | ||
required: true | ||
type: string | ||
nodeVersion: | ||
description: 'Version of node to use.' | ||
required: false | ||
type: string | ||
default: '18.x' | ||
|
||
runs: | ||
using: 'composite' | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
|
||
- run: corepack enable | ||
- uses: actions/setup-node@v4.0.1 | ||
with: | ||
node-version: ${{ inputs.nodeVersion }} | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Cache build artifacts | ||
uses: actions/cache/save@v4.0.0 | ||
with: | ||
path: ./packages/**/dist | ||
key: ${{ inputs.cacheKey }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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: true | ||
type: string | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
group: [backend, frontend, nodes] | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
with: | ||
repository: n8n-io/n8n | ||
ref: ${{ inputs.ref }} | ||
|
||
- run: corepack enable | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4.0.1 | ||
with: | ||
node-version: 18.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: ${{ inputs.cacheKey }} | ||
|
||
- name: Lint | ||
run: pnpm lint:${{ matrix.group }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.