mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
github test workflow: add e2e testing job
This commit is contained in:
parent
a512402425
commit
9d01155d91
67
.github/workflows/test.yml
vendored
67
.github/workflows/test.yml
vendored
@ -1,6 +1,9 @@
|
|||||||
name: gradido test CI
|
name: gradido test CI
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 2283-feature-implement-fullstack-tests-as-github-workflow
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -553,3 +556,65 @@ jobs:
|
|||||||
run: docker-compose -f docker-compose.yml run -T database yarn up
|
run: docker-compose -f docker-compose.yml run -T database yarn up
|
||||||
- name: database | reset
|
- name: database | reset
|
||||||
run: docker-compose -f docker-compose.yml run -T database yarn reset
|
run: docker-compose -f docker-compose.yml run -T database yarn reset
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# JOB: END-TO-END TESTS #####################################################
|
||||||
|
##############################################################################
|
||||||
|
end-to-end-tests:
|
||||||
|
name: End-to-End Tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# needs: [build_test_mariadb, build_test_database_up, build_test_backend, build_test_admin, build_test_frontend, build_test_nginx]
|
||||||
|
steps:
|
||||||
|
##########################################################################
|
||||||
|
# CHECKOUT CODE ##########################################################
|
||||||
|
##########################################################################
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
##########################################################################
|
||||||
|
# BOOT UP THE TEST SYSTEM ################################################
|
||||||
|
##########################################################################
|
||||||
|
- name: Boot up test system | docker-compose mariadb
|
||||||
|
run: docker-compose up --detach mariadb
|
||||||
|
|
||||||
|
- name: Sleep for 30 seconds
|
||||||
|
run: sleep 30s
|
||||||
|
|
||||||
|
- name: Boot up test system | docker-compose database
|
||||||
|
run: docker-compose up --detach --no-deps database
|
||||||
|
|
||||||
|
- name: Boot up test system | docker-compose backend
|
||||||
|
run: docker-compose up --detach --no-deps backend
|
||||||
|
|
||||||
|
- name: Sleep for 90 seconds
|
||||||
|
run: sleep 90s
|
||||||
|
|
||||||
|
- name: Boot up test system | seed backend
|
||||||
|
run: |
|
||||||
|
sudo chown runner:docker -R *
|
||||||
|
cd database
|
||||||
|
yarn && yarn dev_reset
|
||||||
|
cd ../backend
|
||||||
|
yarn && yarn seed
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Boot up test system | docker-compose frontends
|
||||||
|
run: docker-compose up --detach --no-deps frontend admin nginx
|
||||||
|
|
||||||
|
- name: Sleep for 2.5 minutes
|
||||||
|
run: sleep 150s
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
# END-TO-END TESTS #######################################################
|
||||||
|
##########################################################################
|
||||||
|
- name: End-to-end tests | run tests
|
||||||
|
id: e2e-tests
|
||||||
|
run: |
|
||||||
|
cd e2e-tests/cypress/tests/
|
||||||
|
yarn
|
||||||
|
yarn run cypress run --spec cypress/e2e/User.Authentication.feature
|
||||||
|
- name: End-to-end tests | if tests failed, upload screenshots
|
||||||
|
if: steps.e2e-tests.outcome == 'failure'
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: cypress-screenshots
|
||||||
|
path: /home/runner/work/gradido/gradido/e2e-tests/cypress/tests/cypress/screenshots/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user