From 2d871c04dc81cc582b276ad5777cf0cac6d730d8 Mon Sep 17 00:00:00 2001 From: m2rt Date: Thu, 19 Mar 2026 08:55:42 +0200 Subject: [PATCH] chore: add codecov baseline upload on target branch push #364 --- .codecov.yml | 2 +- .github/workflows/angular-test-and-lint.yml | 14 ---------- .github/workflows/codecov-baseline.yml | 30 +++++++++++++++++++++ 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/angular-test-and-lint.yml b/.github/workflows/angular-test-and-lint.yml index 06855b507..03cce03cf 100644 --- a/.github/workflows/angular-test-and-lint.yml +++ b/.github/workflows/angular-test-and-lint.yml @@ -45,20 +45,6 @@ jobs: path: dist/ retention-days: 1 - 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: 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 }}