Add codecov (#6967)

* add codecov upload

* add to readme

* add flags

* dummy change

* dummy change

* switch to inventree org

* add codecov yaml

* lower threshold (for now)
see https://github.com/inventree/InvenTree/pull/6945 for a possibility to get it up again
This commit is contained in:
Matthias Mair 2024-04-07 22:33:26 +01:00 committed by GitHub
parent 3b87c84ae7
commit cc045bcc70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 38 additions and 0 deletions

View File

@ -283,6 +283,12 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: backend
parallel: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: inventree/InvenTree
flags: backend
postgres:
name: Tests - DB [PostgreSQL]
@ -516,6 +522,12 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: pui
parallel: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: inventree/InvenTree
flags: pui
platform_ui_build:
name: Build - UI Platform

View File

@ -14,6 +14,7 @@
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=inventree_InvenTree&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=inventree_InvenTree)
[![Coveralls](https://img.shields.io/coveralls/github/inventree/InvenTree)](https://coveralls.io/github/inventree/InvenTree)
[![codecov](https://codecov.io/gh/inventree/InvenTree/graph/badge.svg?token=9DZRGUUV7B)](https://codecov.io/gh/inventree/InvenTree)
[![Crowdin](https://badges.crowdin.net/inventree/localized.svg)](https://crowdin.com/project/inventree)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/inventree/inventree)
[![Docker Pulls](https://img.shields.io/docker/pulls/inventree/inventree)](https://hub.docker.com/r/inventree/inventree)

23
codecov.yml Normal file
View File

@ -0,0 +1,23 @@
coverage:
status:
project:
default:
target: 75%
github_checks:
annotations: true
flag_management:
default_rules:
carryforward: true
individual_flags:
- name: backend
carryforward: true
statuses:
- type: project
target: 75%
- name: pui
carryforward: true
statuses:
- type: project
target: 45%

View File

@ -385,6 +385,7 @@ if settings.ENABLE_CLASSIC_FRONTEND:
classic_frontendpatterns = [
# Apps
#
path('build/', include(build_urls)),
path('common/', include(common_urls)),
path('company/', include(company_urls)),

View File

@ -30,6 +30,7 @@ let loaded_vals = (window.INVENTREE_SETTINGS || {}) as any;
Object.keys(loaded_vals).forEach((key) => {
if (loaded_vals[key] === undefined) {
delete loaded_vals[key];
// check for empty server list
} else if (key === 'server_list' && loaded_vals[key].length === 0) {
delete loaded_vals[key];