diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 678bd008ac..a155969657 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -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 diff --git a/README.md b/README.md index 949761bfc8..4d7b2e09c5 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..3835b64182 --- /dev/null +++ b/codecov.yml @@ -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% diff --git a/src/backend/InvenTree/InvenTree/urls.py b/src/backend/InvenTree/InvenTree/urls.py index a3f57df1d5..85aa1f0954 100644 --- a/src/backend/InvenTree/InvenTree/urls.py +++ b/src/backend/InvenTree/InvenTree/urls.py @@ -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)), diff --git a/src/frontend/src/main.tsx b/src/frontend/src/main.tsx index 53d9c3cf88..6af6a0b39d 100644 --- a/src/frontend/src/main.tsx +++ b/src/frontend/src/main.tsx @@ -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];