From 962f0d7134b53437cecbfe5fc583fa2c2b7e0081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 3 Jul 2024 10:37:04 +0200 Subject: [PATCH] ci: Update codecov setup (no-changelog) (#9852) --- .github/workflows/ci-master.yml | 4 +++- .github/workflows/units-tests-reusable.yml | 8 ++++++-- packages/@n8n/nodes-langchain/jest.config.js | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 938335558e3ba..6d517cc1d5c73 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -43,7 +43,9 @@ jobs: ref: ${{ inputs.branch }} nodeVersion: ${{ matrix.node-version }} cacheKey: ${{ github.sha }}-base:build - collectCoverage: true + collectCoverage: ${{ matrix.node-version == '20.x' }} + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} lint: name: Lint diff --git a/.github/workflows/units-tests-reusable.yml b/.github/workflows/units-tests-reusable.yml index 61ed73672e7a6..2c82e9834db3a 100644 --- a/.github/workflows/units-tests-reusable.yml +++ b/.github/workflows/units-tests-reusable.yml @@ -22,6 +22,10 @@ on: required: false default: false type: boolean + secrets: + CODECOV_TOKEN: + description: 'Codecov upload token.' + required: false jobs: unit-test: @@ -67,6 +71,6 @@ jobs: - name: Upload coverage to Codecov if: inputs.collectCoverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4.5.0 with: - files: packages/@n8n/chat/coverage/cobertura-coverage.xml,packages/@n8n/nodes-langchain/coverage/cobertura-coverage.xml,packages/@n8n/permissions/coverage/cobertura-coverage.xml,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/@n8n/codemirror-lang/coverage/cobertura-coverage.xml,packages/editor-ui/coverage/cobertura-coverage.xml,packages/nodes-base/coverage/cobertura-coverage.xml,packages/workflow/coverage/cobertura-coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/packages/@n8n/nodes-langchain/jest.config.js b/packages/@n8n/nodes-langchain/jest.config.js index d6c48554a79a4..b95d3acee9c4c 100644 --- a/packages/@n8n/nodes-langchain/jest.config.js +++ b/packages/@n8n/nodes-langchain/jest.config.js @@ -1,2 +1,5 @@ /** @type {import('jest').Config} */ -module.exports = require('../../../jest.config'); +module.exports = { + ...require('../../../jest.config'), + collectCoverageFrom: ['credentials/**/*.ts', 'nodes/**/*.ts', 'utils/**/*.ts'], +};