mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
ci: Fix code coverage collection (#12443)
This commit is contained in:
committed by
GitHub
parent
39d5e0ff87
commit
f043ff12c6
1
.github/workflows/ci-master.yml
vendored
1
.github/workflows/ci-master.yml
vendored
@@ -47,6 +47,7 @@ jobs:
|
||||
nodeVersion: ${{ matrix.node-version }}
|
||||
cacheKey: ${{ github.sha }}-base:build
|
||||
collectCoverage: ${{ matrix.node-version == '20.x' }}
|
||||
ignoreTurboCache: ${{ matrix.node-version == '20.x' }}
|
||||
secrets:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
|
||||
7
.github/workflows/units-tests-reusable.yml
vendored
7
.github/workflows/units-tests-reusable.yml
vendored
@@ -22,6 +22,10 @@ on:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
ignoreTurboCache:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
secrets:
|
||||
CODECOV_TOKEN:
|
||||
description: 'Codecov upload token.'
|
||||
@@ -32,6 +36,7 @@ jobs:
|
||||
name: Unit tests
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TURBO_FORCE: ${{ inputs.ignoreTurboCache }}
|
||||
COVERAGE_ENABLED: ${{ inputs.collectCoverage }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4.1.1
|
||||
@@ -73,6 +78,6 @@ jobs:
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
if: inputs.collectCoverage
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
uses: codecov/codecov-action@v5.1.2
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
58
codecov.yml
Normal file
58
codecov.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
codecov:
|
||||
max_report_age: off
|
||||
require_ci_to_pass: true
|
||||
|
||||
coverage:
|
||||
status:
|
||||
patch: false
|
||||
project:
|
||||
default:
|
||||
threshold: 0.5%
|
||||
|
||||
github_checks:
|
||||
annotations: false
|
||||
|
||||
flags:
|
||||
tests:
|
||||
paths:
|
||||
- "**"
|
||||
carryforward: true
|
||||
|
||||
component_management:
|
||||
default_rules:
|
||||
statuses:
|
||||
- type: project
|
||||
target: auto
|
||||
branches:
|
||||
- "!master"
|
||||
individual_components:
|
||||
- component_id: backend_packages
|
||||
name: Backend
|
||||
paths:
|
||||
- packages/@n8n/api-types/**
|
||||
- packages/@n8n/config/**
|
||||
- packages/@n8n/client-oauth2/**
|
||||
- packages/@n8n/imap/**
|
||||
- packages/@n8n/permissions/**
|
||||
- packages/@n8n/task-runner/**
|
||||
- packages/n8n-workflow/**
|
||||
- packages/n8n-core/**
|
||||
- packages/n8n-node-dev/**
|
||||
- packages/n8n/**
|
||||
- component_id: frontend_packages
|
||||
name: Frontend
|
||||
paths:
|
||||
- packages/@n8n/chat/**
|
||||
- packages/@n8n/codemirror-lang/**
|
||||
- packages/n8n-design-system/**
|
||||
- packages/n8n-editor-ui/**
|
||||
- component_id: nodes_packages
|
||||
name: Nodes
|
||||
paths:
|
||||
- packages/n8n-nodes-base/**
|
||||
- packages/@n8n/n8n-nodes-langchain/**
|
||||
|
||||
ignore:
|
||||
- (?s:.*/[^\/]*\.spec\.ts.*)\Z
|
||||
- (?s:.*/[^\/]*\.test\.ts.*)\Z
|
||||
- (?s:.*/[^\/]*e2e[^\/]*\.ts.*)\Z
|
||||
11
turbo.json
11
turbo.json
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"outputs": ["dist/**", "coverage/**"]
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"typecheck": {
|
||||
"dependsOn": ["^typecheck"]
|
||||
@@ -66,7 +66,8 @@
|
||||
"n8n-workflow#test",
|
||||
"n8n-core#test",
|
||||
"n8n#test"
|
||||
]
|
||||
],
|
||||
"outputs": ["coverage/**"]
|
||||
},
|
||||
"test:frontend": {
|
||||
"dependsOn": [
|
||||
@@ -74,10 +75,12 @@
|
||||
"@n8n/codemirror-lang#test",
|
||||
"n8n-design-system#test",
|
||||
"n8n-editor-ui#test"
|
||||
]
|
||||
],
|
||||
"outputs": ["coverage/**"]
|
||||
},
|
||||
"test:nodes": {
|
||||
"dependsOn": ["n8n-nodes-base#test", "@n8n/n8n-nodes-langchain#test"]
|
||||
"dependsOn": ["n8n-nodes-base#test", "@n8n/n8n-nodes-langchain#test"],
|
||||
"outputs": ["coverage/**"]
|
||||
},
|
||||
"test": {},
|
||||
"watch": {
|
||||
|
||||
Reference in New Issue
Block a user