ci: Add support for Node.js 18 (#5793)
* ci: Start supporting Node.js 18 Node.js 18 became the active LTS on 2022-10-25, and Node.js 16 went into maintenance mode. https://github.com/nodejs/Release#release-schedule We should also slowly deprecate node 16 support, [as support for it is ends much earlier now, due to support for openssl 1.1.1 ending](https://nodejs.org/en/blog/announcements/nodejs16-eol). * Remove hashing algorithms that are not available in newer node.js/openssl - RSA-MD4 - RSA-MDC2 - md4 - md4WithRSAEncryption - mdc2 - mdc2WithRSA * in e2e tests, resolve `localhost` to ipv4 instead of ipv6
This commit is contained in:
committed by
GitHub
parent
e8b51c8da9
commit
968b733fd6
@@ -20,7 +20,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
2
.github/workflows/check-pr-title.yml
vendored
2
.github/workflows/check-pr-title.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
2
.github/workflows/ci-master.yml
vendored
2
.github/workflows/ci-master.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
node-version: [16.x, 18.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
2
.github/workflows/ci-postgres-mysql.yml
vendored
2
.github/workflows/ci-postgres-mysql.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
21
.github/workflows/ci-pull-requests.yml
vendored
21
.github/workflows/ci-pull-requests.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
||||
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
|
||||
- name: Use Node.js 16
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
/github/home/.pnpm-store
|
||||
./node_modules
|
||||
./packages
|
||||
key: ${{ github.sha }}-base:16.18.1-test-lint
|
||||
key: ${{ github.sha }}-base:18-test-lint
|
||||
|
||||
unit-test:
|
||||
name: Unit tests
|
||||
@@ -54,14 +54,14 @@ jobs:
|
||||
/github/home/.pnpm-store
|
||||
./node_modules
|
||||
./packages
|
||||
key: ${{ github.sha }}-base:16.18.1-test-lint
|
||||
key: ${{ github.sha }}-base:18-test-lint
|
||||
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
|
||||
- name: Use Node.js 16
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: pnpm
|
||||
|
||||
- name: Test
|
||||
@@ -90,14 +90,14 @@ jobs:
|
||||
/github/home/.pnpm-store
|
||||
./node_modules
|
||||
./packages
|
||||
key: ${{ github.sha }}-base:16.18.1-test-lint
|
||||
key: ${{ github.sha }}-base:18-test-lint
|
||||
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
|
||||
- name: Use Node.js 16
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: pnpm
|
||||
|
||||
- name: Fetch base branch for `git diff`
|
||||
@@ -109,13 +109,12 @@ jobs:
|
||||
run: pnpm lint
|
||||
|
||||
smoke-test:
|
||||
name: E2E [Electron/Node 16]
|
||||
name: E2E [Electron/Node 18]
|
||||
uses: ./.github/workflows/e2e-reusable.yml
|
||||
with:
|
||||
branch: ${{ github.event.pull_request.base.ref }}
|
||||
user: ${{ github.event.inputs.user || 'PR User' }}
|
||||
spec: ${{ github.event.inputs.spec || 'e2e/0-smoke.cy.ts' }}
|
||||
run-env: browsers:node16.18.0-chrome107-ff106-edge
|
||||
record: false
|
||||
parallel: false
|
||||
pr_number: ${{ github.event.number }}
|
||||
|
||||
5
.github/workflows/docker-base-image.yml
vendored
5
.github/workflows/docker-base-image.yml
vendored
@@ -5,9 +5,12 @@ on:
|
||||
inputs:
|
||||
node_version:
|
||||
description: 'Node.js version to build this image with.'
|
||||
type: string
|
||||
type: choice
|
||||
required: true
|
||||
default: '16'
|
||||
options:
|
||||
- '16'
|
||||
- '18'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
2
.github/workflows/docker-image-v1-rc.yml
vendored
2
.github/workflows/docker-image-v1-rc.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
- run: npm install --prefix=.github/scripts --no-package-lock
|
||||
|
||||
- name: Bump package versions to 1.0.0
|
||||
|
||||
6
.github/workflows/e2e-reusable.yml
vendored
6
.github/workflows/e2e-reusable.yml
vendored
@@ -20,7 +20,7 @@ on:
|
||||
run-env:
|
||||
description: 'Node env version to run tests with.'
|
||||
required: false
|
||||
default: 'browsers:node16.18.0-chrome90-ff88'
|
||||
default: 'browsers:node18.12.0-chrome107'
|
||||
type: string
|
||||
cache-key:
|
||||
description: 'Cache key for modules and build artifacts.'
|
||||
@@ -55,7 +55,6 @@ on:
|
||||
description: 'True if all E2E tests passed, otherwise false'
|
||||
value: ${{ jobs.check_testing_matrix.outputs.all_tests_passed }}
|
||||
|
||||
|
||||
jobs:
|
||||
# single job that generates and outputs a common id
|
||||
prepare:
|
||||
@@ -163,9 +162,10 @@ jobs:
|
||||
# We have to provide custom ci-build-id key to make sure that this workflow could be run multiple times
|
||||
# in the same parent workflow
|
||||
ci-build-id: ${{ needs.prepare.outputs.uuid }}
|
||||
spec: "/__w/n8n/n8n/cypress/${{ inputs.spec }}"
|
||||
spec: '/__w/n8n/n8n/cypress/${{ inputs.spec }}'
|
||||
config-file: /__w/n8n/n8n/cypress.config.js
|
||||
env:
|
||||
NODE_OPTIONS: --dns-result-order=ipv4first
|
||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
E2E_TESTS: true
|
||||
|
||||
5
.github/workflows/e2e-tests-pr.yml
vendored
5
.github/workflows/e2e-tests-pr.yml
vendored
@@ -8,20 +8,19 @@ on:
|
||||
|
||||
jobs:
|
||||
run-e2e-tests:
|
||||
name: E2E [Electron/Node 16]
|
||||
name: E2E [Electron/Node 18]
|
||||
uses: ./.github/workflows/e2e-reusable.yml
|
||||
if: ${{ github.event.review.state == 'approved' && !contains(github.event.pull_request.labels.*.name, 'community') }}
|
||||
with:
|
||||
branch: ${{ github.event.pull_request.head.ref }}
|
||||
user: ${{ github.event.pull_request.user.login || 'PR User' }}
|
||||
spec: 'e2e/*'
|
||||
run-env: base:16.18.1
|
||||
secrets:
|
||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||
|
||||
post-e2e-tests:
|
||||
runs-on: ubuntu-latest
|
||||
name: E2E [Electron/Node 16] - Checks
|
||||
name: E2E [Electron/Node 18] - Checks
|
||||
needs: [run-e2e-tests]
|
||||
if: always()
|
||||
steps:
|
||||
|
||||
3
.github/workflows/e2e-tests.yml
vendored
3
.github/workflows/e2e-tests.yml
vendored
@@ -40,13 +40,12 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
run-e2e-tests:
|
||||
name: E2E [Electron/Node 16]
|
||||
name: E2E [Electron/Node 18]
|
||||
uses: ./.github/workflows/e2e-reusable.yml
|
||||
with:
|
||||
branch: ${{ github.event.inputs.branch || 'master' }}
|
||||
user: ${{ github.event.inputs.user || 'PR User' }}
|
||||
spec: ${{ github.event.inputs.spec || 'e2e/*' }}
|
||||
run-env: base:16.18.1
|
||||
secrets:
|
||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
||||
|
||||
|
||||
2
.github/workflows/release-create-pr.yml
vendored
2
.github/workflows/release-create-pr.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
- run: npm install --prefix=.github/scripts --no-package-lock
|
||||
|
||||
- name: Bump package versions
|
||||
|
||||
2
.github/workflows/release-publish.yml
vendored
2
.github/workflows/release-publish.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
cache: 'pnpm'
|
||||
- run: pnpm install --frozen-lockfile
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 18.x
|
||||
- run: |
|
||||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
||||
npm dist-tag add n8n@${{ github.event.inputs.version }} ${{ github.event.inputs.release-channel }}
|
||||
|
||||
8
.github/workflows/test-workflows.yml
vendored
8
.github/workflows/test-workflows.yml
vendored
@@ -11,9 +11,6 @@ jobs:
|
||||
|
||||
timeout-minutes: 30
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -30,10 +27,9 @@ jobs:
|
||||
with:
|
||||
version: 8.1.0
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
node-version: 18.x
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: 'n8n/pnpm-lock.yaml'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user