mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
ci: Parallelize ci-master (no-changelog) (#6819)
* ci: Parallelize `ci-master` (no-changelog) * ci: Move notify-on-failure to own job * ci: Fix syntax * ci: Dry run by adding branch * ci: Fix job reference * ci: Ensure full lint * ci: Restore `CI_LINT_MASTER` * ci: Remove env from top level * ci: Add matrix strategy * ci: Remove excess quotes * ci: Remove excess key * ci: Try with `run_install` * Revert "ci: Try with `run_install`" This reverts commit e5778c5735974e755fd94b9c5ae4b8a33dbc73b2. * ci: Add missing strategy * ci: Remove temp branch * test: Comment out test (from other PR)
This commit is contained in:
81
.github/workflows/ci-master.yml
vendored
81
.github/workflows/ci-master.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
install-and-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'pnpm'
|
cache: pnpm
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
@@ -32,6 +32,47 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm build
|
run: pnpm build
|
||||||
|
|
||||||
|
- name: Cache build artifacts
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/github/home/.cache
|
||||||
|
/github/home/.pnpm-store
|
||||||
|
./node_modules
|
||||||
|
./packages
|
||||||
|
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
name: Unit tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: install-and-build
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [18.x, 20.x]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: n8n-io/n8n
|
||||||
|
ref: ${{ inputs.branch }}
|
||||||
|
|
||||||
|
- name: Restore cached build artifacts
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/github/home/.cache
|
||||||
|
/github/home/.pnpm-store
|
||||||
|
./node_modules
|
||||||
|
./packages
|
||||||
|
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||||
|
|
||||||
|
- 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: pnpm
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm test
|
run: pnpm test
|
||||||
|
|
||||||
@@ -40,11 +81,47 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: 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/editor-ui/coverage/cobertura-coverage.xml,packages/nodes-base/coverage/cobertura-coverage.xml,packages/workflow/coverage/cobertura-coverage.xml
|
files: 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/editor-ui/coverage/cobertura-coverage.xml,packages/nodes-base/coverage/cobertura-coverage.xml,packages/workflow/coverage/cobertura-coverage.xml
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Lint changes
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: install-and-build
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [18.x, 20.x]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: n8n-io/n8n
|
||||||
|
ref: ${{ inputs.branch }}
|
||||||
|
|
||||||
|
- name: Restore cached build artifacts
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/github/home/.cache
|
||||||
|
/github/home/.pnpm-store
|
||||||
|
./node_modules
|
||||||
|
./packages
|
||||||
|
key: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||||
|
|
||||||
|
- 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: pnpm
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
env:
|
env:
|
||||||
CI_LINT_MASTER: true
|
CI_LINT_MASTER: true
|
||||||
run: pnpm lint
|
run: pnpm lint
|
||||||
|
|
||||||
|
notify-on-failure:
|
||||||
|
name: Notify Slack on failure
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [unit-test, lint]
|
||||||
|
steps:
|
||||||
- name: Notify Slack on failure
|
- name: Notify Slack on failure
|
||||||
uses: act10ns/slack@v2.0.0
|
uses: act10ns/slack@v2.0.0
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
Reference in New Issue
Block a user