mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
ci: Improve CI performance (no-changelog) (#7637)
1. Split backend and frontend tests to avoid them running in parallel 2. Enable coverage only on `master`
This commit is contained in:
committed by
GitHub
parent
f748de9567
commit
2f665683fc
3
.github/workflows/ci-master.yml
vendored
3
.github/workflows/ci-master.yml
vendored
@@ -48,7 +48,8 @@ jobs:
|
||||
with:
|
||||
ref: ${{ inputs.branch }}
|
||||
nodeVersion: ${{ matrix.node-version }}
|
||||
cacheKey: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||
cacheKey: ${{ github.sha }}-base:${{ matrix.node-version }}-test-lint
|
||||
collectCoverage: true
|
||||
|
||||
lint:
|
||||
name: Lint changes
|
||||
|
||||
14
.github/workflows/units-tests-reusable.yml
vendored
14
.github/workflows/units-tests-reusable.yml
vendored
@@ -18,11 +18,17 @@ on:
|
||||
required: false
|
||||
default: ''
|
||||
type: string
|
||||
collectCoverage:
|
||||
required: false
|
||||
default: 'false'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
name: Unit tests
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COVERAGE_ENABLED: ${{ inputs.collectCoverage }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3.5.3
|
||||
with:
|
||||
@@ -51,10 +57,14 @@ jobs:
|
||||
path: ./packages/**/dist
|
||||
key: ${{ inputs.cacheKey }}
|
||||
|
||||
- name: Test
|
||||
run: pnpm test
|
||||
- name: Test Backend
|
||||
run: pnpm test:backend
|
||||
|
||||
- name: Test Frontend
|
||||
run: pnpm test:frontend
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: ${{ inputs.collectCoverage == 'true' }}
|
||||
uses: codecov/codecov-action@v3
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user