feat: Switch from npm to pnpm (#4429)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-09 17:32:05 +01:00
committed by GitHub
parent db163b71b9
commit 736777385c
33 changed files with 22666 additions and 72016 deletions

View File

@@ -22,9 +22,9 @@ A clear and concise description of what you expected to happen.
**Environment (please complete the following information):**
- OS: [e.g. Ubuntu Linux 18.04]
- n8n Version [e.g. 0.119.0]
- Node.js Version [e.g. 14.16.0]
- OS: [e.g. Ubuntu Linux 22.04]
- n8n Version [e.g. 0.200.1]
- Node.js Version [e.g. 16.17.0]
- Database system [e.g. SQLite; n8n uses SQLite as default otherwise changed]
- Operation mode [e.g. own; operation modes are `own`, `main` and `queue`. Default is `own`]

View File

@@ -18,25 +18,27 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: 'pnpm'
- name: Install npm and dependencies
run: npm install -g npm@latest && npm install
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: npm run build --if-present
run: pnpm build
- name: Test
run:
npm run test
run: pnpm test
- name: Test E2E
run:
npm run test:e2e:ci:smoke
run: |
pnpm cypress:install
pnpm test:e2e:ci:smoke
- name: Lint
run: npm run lint
run: pnpm lint

View File

@@ -18,13 +18,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'npm'
cache: 'pnpm'
- name: Install npm and dependencies
run: npm install -g npm@latest && npm install
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Start MySQL & Postgres
uses: isbang/compose-action@v1.3.2
@@ -32,16 +34,16 @@ jobs:
compose-file: ./.github/docker-compose.yml
- name: Build Core & Workflow
run: npm run -w packages/workflow -w packages/core build
run: pnpm --filter n8n-workflow --filter=n8n-core build
- name: Test MySQL
working-directory: packages/cli
run: npm run test:mysql
run: pnpm test:mysql
- name: Test Postgres
working-directory: packages/cli
run: npm run test:postgres
run: pnpm test:postgres
- name: Test Postgres (alternate schema)
working-directory: packages/cli
run: npm run test:postgres:alt-schema
run: pnpm test:postgres:alt-schema

View File

@@ -15,24 +15,27 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: 'pnpm'
- name: Install npm and dependencies
run: npm install -g npm@latest && npm install
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: npm run build --if-present
run: pnpm build
- name: Test
run: npm run test
run: pnpm test
- name: Test E2E
run:
npm run test:e2e:ci:smoke
run: |
pnpm cypress:install
pnpm test:e2e:ci:smoke
- name: Fetch base branch for `git diff`
run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
@@ -40,4 +43,4 @@ jobs:
- name: Run ESLint on changes only
env:
ESLINT_PLUGIN_DIFF_COMMIT: ${{ github.event.pull_request.base.ref }}
run: npm run lint
run: pnpm lint

View File

@@ -26,12 +26,14 @@ jobs:
repository: n8n-io/test-workflows
path: test-workflows
- uses: pnpm/action-setup@v2.2.4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'n8n/package-lock.json'
cache: 'pnpm'
cache-dependency-path: 'n8n/pnpm-lock.yaml'
- name: Install dependencies
run: |
@@ -41,12 +43,11 @@ jobs:
DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y graphicsmagick
shell: bash
- name: npm install and build
- name: pnpm install and build
working-directory: n8n
run: |
npm install -g npm@latest
npm install
npm run build --if-present
pnpm install
pnpm build
shell: bash
- name: Import credentials