-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into fix-chat-response-t…
…o-webhook
- Loading branch information
Showing
2,000 changed files
with
62,024 additions
and
41,508 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { writeFile, readFile, copyFile } from 'fs/promises'; | ||
import { resolve, dirname } from 'path'; | ||
import child_process from 'child_process'; | ||
import { fileURLToPath } from 'url'; | ||
import { promisify } from 'util'; | ||
|
||
const exec = promisify(child_process.exec); | ||
|
||
const commonFiles = ['LICENSE.md', 'LICENSE_EE.md']; | ||
|
||
const baseDir = resolve(dirname(fileURLToPath(import.meta.url)), '../..'); | ||
const packages = JSON.parse((await exec('pnpm ls -r --only-projects --json')).stdout); | ||
|
||
for (let { name, path, version, private: isPrivate } of packages) { | ||
if (isPrivate) continue; | ||
|
||
const packageFile = resolve(path, 'package.json'); | ||
const packageJson = { | ||
...JSON.parse(await readFile(packageFile, 'utf-8')), | ||
// Add these fields to all published package.json files to ensure provenance checks pass | ||
license: 'SEE LICENSE IN LICENSE.md', | ||
homepage: 'https://n8n.io', | ||
author: { | ||
name: 'Jan Oberhauser', | ||
email: '[email protected]', | ||
}, | ||
repository: { | ||
type: 'git', | ||
url: 'git+https://github.com/n8n-io/n8n.git', | ||
}, | ||
}; | ||
|
||
// Copy over LICENSE.md and LICENSE_EE.md into every published package, and ensure they get included in the published package | ||
await Promise.all( | ||
commonFiles.map(async (file) => { | ||
await copyFile(resolve(baseDir, file), resolve(path, file)); | ||
if (packageJson.files && !packageJson.files.includes(file)) { | ||
packageJson.files.push(file); | ||
} | ||
}), | ||
); | ||
|
||
await writeFile(packageFile, JSON.stringify(packageJson, null, 2) + '\n'); | ||
} |
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
5 changes: 4 additions & 1 deletion
5
scripts/trim-fe-packageJson.js → .github/scripts/trim-fe-packageJson.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,9 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
uses: rharkor/[email protected] | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
|
@@ -38,12 +41,14 @@ jobs: | |
needs: install-and-build | ||
strategy: | ||
matrix: | ||
node-version: [18.x, 20.x, 22.x] | ||
node-version: [18.x, 20.x, 22.4] | ||
with: | ||
ref: ${{ inputs.branch }} | ||
nodeVersion: ${{ matrix.node-version }} | ||
cacheKey: ${{ github.sha }}-base:build | ||
collectCoverage: true | ||
collectCoverage: ${{ matrix.node-version == '20.x' }} | ||
secrets: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
lint: | ||
name: Lint | ||
|
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 |
---|---|---|
|
@@ -26,6 +26,9 @@ jobs: | |
cache: 'pnpm' | ||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
uses: rharkor/[email protected] | ||
|
||
- name: Build Backend | ||
run: pnpm build:backend | ||
|
||
|
@@ -52,6 +55,9 @@ jobs: | |
cache: 'pnpm' | ||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
uses: rharkor/[email protected] | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
|
@@ -60,7 +66,7 @@ jobs: | |
|
||
- name: Test SQLite Pooled | ||
working-directory: packages/cli | ||
run: pnpm jest --coverage | ||
run: pnpm jest | ||
|
||
mysql: | ||
name: MySQL | ||
|
@@ -78,6 +84,9 @@ jobs: | |
cache: 'pnpm' | ||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
uses: rharkor/[email protected] | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
|
@@ -112,6 +121,9 @@ jobs: | |
cache: 'pnpm' | ||
- run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
uses: rharkor/[email protected] | ||
|
||
- name: Restore cached build artifacts | ||
uses: actions/cache/[email protected] | ||
with: | ||
|
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 |
---|---|---|
|
@@ -21,6 +21,9 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
uses: rharkor/[email protected] | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
|
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
name: Docker Image CI | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
tags: | ||
- 'n8n@*' | ||
|
||
jobs: | ||
build: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,9 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
uses: rharkor/[email protected] | ||
|
||
- name: Build | ||
if: ${{ inputs.cacheKey == '' }} | ||
run: pnpm build | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,10 @@ on: | |
required: false | ||
default: false | ||
type: boolean | ||
secrets: | ||
CODECOV_TOKEN: | ||
description: 'Codecov upload token.' | ||
required: false | ||
|
||
jobs: | ||
unit-test: | ||
|
@@ -45,6 +49,10 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup build cache | ||
if: inputs.collectCoverage != true | ||
uses: rharkor/[email protected] | ||
|
||
- name: Build | ||
if: ${{ inputs.cacheKey == '' }} | ||
run: pnpm build | ||
|
@@ -67,6 +75,6 @@ jobs: | |
|
||
- name: Upload coverage to Codecov | ||
if: inputs.collectCoverage | ||
uses: codecov/codecov-action@v3 | ||
uses: codecov/codecov-action@v4.5.0 | ||
with: | ||
files: packages/@n8n/chat/coverage/cobertura-coverage.xml,packages/@n8n/nodes-langchain/coverage/cobertura-coverage.xml,packages/@n8n/permissions/coverage/cobertura-coverage.xml,packages/@n8n/client-oauth2/coverage/cobertura-coverage.xml,packages/cli/coverage/cobertura-coverage.xml,packages/core/coverage/cobertura-coverage.xml,packages/design-system/coverage/cobertura-coverage.xml,packages/@n8n/codemirror-lang/coverage/cobertura-coverage.xml,packages/editor-ui/coverage/cobertura-coverage.xml,packages/nodes-base/coverage/cobertura-coverage.xml,packages/workflow/coverage/cobertura-coverage.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} |
Oops, something went wrong.