mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
frontend coverage test & report
This commit is contained in:
parent
17f20c1f09
commit
a79947e37a
23
.github/workflows/test.yml
vendored
23
.github/workflows/test.yml
vendored
@ -238,4 +238,25 @@ jobs:
|
||||
- name: backend | docker-compose
|
||||
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp
|
||||
- name: webapp | Unit tests
|
||||
run: docker-compose exec -T webapp yarn test
|
||||
run: |
|
||||
docker-compose -v ~/coverage:/app/coverage exec -T webapp yarn test
|
||||
cp -r ~/coverage ./coverage
|
||||
##########################################################################
|
||||
# COVERAGE REPORT FRONTEND ################################################
|
||||
##########################################################################
|
||||
# TODO: Maybe remove this later on to avoid spam?
|
||||
- name: frontend | Coverage report
|
||||
uses: romeovs/lcov-reporter-action@v0.2.21
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
lcov-file: ./coverage/lcov.info
|
||||
##########################################################################
|
||||
# COVERAGE CHECK FRONTEND ################################################
|
||||
##########################################################################
|
||||
- name: frontend | Coverage check
|
||||
uses: devmasx/coverage-check-action@v1.2.0
|
||||
with:
|
||||
type: lcov
|
||||
result_path: ./coverage/lcov.info
|
||||
min_coverage: 45
|
||||
token: ${{ github.token }}
|
||||
@ -17,7 +17,7 @@
|
||||
"lint": "eslint --ext .js,.vue .",
|
||||
"locales": "../scripts/translations/missing-keys.sh && ../scripts/translations/sort.sh",
|
||||
"precommit": "yarn lint",
|
||||
"test": "cross-env NODE_ENV=test jest",
|
||||
"test": "cross-env NODE_ENV=test jest --coverage",
|
||||
"test:unit:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --no-cache --runInBand"
|
||||
},
|
||||
"jest": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user