Skip to content
Snippets Groups Projects
Unverified Commit b3e5e5c8 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Upload front-end code coverage to codecov.io (#17440)

* Tweak Codecov settings to account for front-end coverage
* Scope back-end coverage with the correct codecov flag
* Add enterprise/frontend
parent 4b8a541c
No related branches found
No related tags found
No related merge requests found
......@@ -1014,7 +1014,8 @@ workflows:
after-steps:
- run:
name: Upload code coverage to codecov.io
command: bash <(curl -s https://codecov.io/bash)
command: bash <(curl -s https://codecov.io/bash) -F back-end
skip-when-no-change: true
- test-driver:
......
......@@ -96,8 +96,13 @@ jobs:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile --prefer-offline
- run: yarn run test-unit
- run: yarn run test-unit --coverage --silent
name: Run frontend unit tests
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v2
with:
files: ./coverage/lcov.info
flags: front-end
fe-tests-timezones:
runs-on: ubuntu-20.04
......
......@@ -5,12 +5,40 @@ codecov:
coverage:
status:
project:
default:
back-end:
# Project must always have at least 78% coverage (by line)
target: 78%
# Whole-project test coverage is allowed to drop up to 5%. (For situtations where we delete code with full coverage)
threshold: 5%
flags:
- back-end
front-end:
target: 35%
threshold: 5%
flags:
- front-end
patch:
default:
back-end:
# Changes must have at least 75% test coverage (by line)
target: 75%
flags:
- back-end
front-end:
target: 35%
flags:
- front-end
flags:
back-end:
paths:
- enterprise/backend
- shared/src
- src/metabase
front-end:
paths:
- enterprise/frontend
- frontend
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment