ci: add coverage for the frontend

fixes #2945

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Philip Molares 2023-08-06 19:34:20 +02:00 committed by Erik Michelson
parent 8d1d11e151
commit 012e6c3649
3 changed files with 11 additions and 4 deletions

View file

@ -49,7 +49,7 @@ jobs:
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
directory: backend/coverage-e2e
flags: e2e-tests
flags: backend, e2e-tests, backend-e2e-tests
backend-mariadb:
if: "(github.event_name == 'pull_request_target') == github.event.pull_request.head.repo.fork"

View file

@ -51,9 +51,16 @@ jobs:
TURBO_API: ${{ vars.TURBO_API }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
- name: Upload coverage
- name: Upload backend coverage
if: "${{ matrix.coverage == true }}"
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
directory: backend/coverage
flags: integration-tests
flags: backend, unit-tests, backend-unit-tests
- name: Upload frontend coverage
if: "${{ matrix.coverage == true }}"
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
directory: frontend/coverage
flags: frontend, unit-tests, frontend-unit-tests

View file

@ -20,7 +20,7 @@
"test:e2e": "cypress run --browser chrome",
"test:e2e:ci": "cypress run --browser chrome --record true --parallel --group \"chrome\"",
"test:watch": "cross-env NODE_ENV=test jest --watch",
"test:ci": "cross-env NODE_ENV=test jest --ci",
"test:ci": "cross-env NODE_ENV=test jest --coverage",
"test": "cross-env NODE_ENV=test jest"
},
"browserslist": {