add dependency database_migration_test to backend unit tests, do not wait anymore

This commit is contained in:
Moriz Wahl 2022-03-14 10:25:12 +01:00
parent a503815829
commit d0df7002f9

View File

@ -489,7 +489,7 @@ jobs:
unit_test_backend: unit_test_backend:
name: Unit tests - Backend name: Unit tests - Backend
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build_test_mariadb, build_test_database_up] needs: [build_test_mariadb, database_migration_test, build_test_database_up]
steps: steps:
########################################################################## ##########################################################################
# CHECKOUT CODE ########################################################## # CHECKOUT CODE ##########################################################
@ -510,15 +510,7 @@ jobs:
# UNIT TESTS BACKEND ##################################################### # UNIT TESTS BACKEND #####################################################
########################################################################## ##########################################################################
- name: backend | docker-compose - name: backend | docker-compose
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb database
- name: Sleep for 30 seconds
run: sleep 30s
shell: bash
- name: backend | docker-compose database
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps database
- name: Sleep for 30 seconds
run: sleep 30s
shell: bash
- name: backend Unit tests | test - name: backend Unit tests | test
run: cd database && yarn && yarn build && cd ../backend && yarn && yarn test run: cd database && yarn && yarn build && cd ../backend && yarn && yarn test
# run: docker-compose -f docker-compose.yml -f docker-compose.test.yml exec -T backend yarn test # run: docker-compose -f docker-compose.yml -f docker-compose.test.yml exec -T backend yarn test