From 919c4d2adda343408f1a4c946c168dc4c3e7e5c6 Mon Sep 17 00:00:00 2001 From: m2rt Date: Thu, 19 Mar 2026 08:59:02 +0200 Subject: [PATCH] chore: add codecov baseline upload on target branch push #568 --- .codecov.yml | 2 +- .github/workflows/codecov-baseline.yml | 30 +++++++++++++++++++++++ .github/workflows/react-test-and-lint.yml | 14 ----------- 3 files changed, 31 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/codecov-baseline.yml diff --git a/.codecov.yml b/.codecov.yml index 2c51aa44f..8a0f4a2bf 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -3,4 +3,4 @@ coverage: patch: default: target: 80% - threshold: 80% + threshold: 10% diff --git a/.github/workflows/codecov-baseline.yml b/.github/workflows/codecov-baseline.yml new file mode 100644 index 000000000..4a6c309a7 --- /dev/null +++ b/.github/workflows/codecov-baseline.yml @@ -0,0 +1,30 @@ +name: Codecov baseline + +on: + push: + branches: + - main + - rc + +jobs: + upload-coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: "lts/*" + + - name: Install dependencies + run: npm ci --cache .npm --prefer-offline + + - name: Run coverage tests + run: npm run test:coverage + + - name: Upload results to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/react-test-and-lint.yml b/.github/workflows/react-test-and-lint.yml index 6fe91ee29..86a5a40d3 100644 --- a/.github/workflows/react-test-and-lint.yml +++ b/.github/workflows/react-test-and-lint.yml @@ -43,20 +43,6 @@ jobs: npm ci --cache .npm --prefer-offline npm run build - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "lts/*" - - name: Test - run: | - npm ci --cache .npm --prefer-offline - npm run test - test-coverage: runs-on: ubuntu-latest steps: