Merge branch 'master' of https://github.com/Ocelot-Social-Community/Ocelot-Social into 4265-move-sort-newsfeed-menu-into-filter-menu

This commit is contained in:
Wolfgang Huß 2021-04-14 18:37:52 +02:00
commit 7cf80c52ca
4 changed files with 38 additions and 3 deletions

View File

@ -204,6 +204,17 @@ jobs:
run: docker-compose exec -T backend yarn db:migrate init
- name: backend | Unit test
run: docker-compose exec -T backend yarn test
##########################################################################
# COVERAGE CHECK BACKEND #################################################
##########################################################################
- name: backend | Coverage check
uses: webcraftmedia/coverage-check-action@master
with:
report_name: Coverage Backend
type: lcov
result_path: ./coverage/lcov.info
min_coverage: 58
token: ${{ github.token }}
##############################################################################
# JOB: UNIT TEST WEBAPP ######################################################
@ -238,4 +249,24 @@ 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 exec -T webapp yarn test
##########################################################################
# 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 WEBAPP ##################################################
##########################################################################
- name: webapp | Coverage check
uses: webcraftmedia/coverage-check-action@master
with:
report_name: Coverage Webapp
type: lcov
result_path: ./coverage/lcov.info
min_coverage: 52
token: ${{ github.token }}

View File

@ -15,7 +15,7 @@
"dev": "nodemon --exec babel-node src/ -e js,gql",
"dev:debug": "nodemon --exec babel-node --inspect=0.0.0.0:9229 src/ -e js,gql",
"lint": "eslint src --config .eslintrc.js",
"test": "cross-env NODE_ENV=test jest --forceExit --detectOpenHandles --runInBand",
"test": "cross-env NODE_ENV=test jest --forceExit --detectOpenHandles --runInBand --coverage",
"db:clean": "babel-node src/db/clean.js",
"db:reset": "yarn run db:clean",
"db:seed": "babel-node src/db/seed.js",

View File

@ -10,6 +10,8 @@ services:
target: test
environment:
- NODE_ENV="test"
volumes:
- ./coverage:/app/coverage
########################################################
# BACKEND ##############################################
@ -20,6 +22,8 @@ services:
target: test
environment:
- NODE_ENV="test"
volumes:
- ./coverage:/app/coverage
########################################################
# NEO4J ################################################

View File

@ -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": {