From 306c039b4ddd7ba22e2ab8eb13fd301ffba55d1a Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 2 Feb 2023 15:46:13 +0100 Subject: [PATCH] comment workflow jobs for e2e testing --- .github/workflows/test.yml | 619 ++++++++++++++++++------------------- 1 file changed, 306 insertions(+), 313 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60b2b9ac7..f4b9dfda9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -192,345 +192,345 @@ jobs: ############################################################################## # JOB: LINT FRONTEND ######################################################### ############################################################################## - lint_frontend: - name: Lint - Frontend - runs-on: ubuntu-latest - needs: [build_test_frontend] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGE ################################################## - ########################################################################## - - name: Download Docker Image (Frontend) - uses: actions/download-artifact@v3 - with: - name: docker-frontend-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/frontend.tar - ########################################################################## - # LINT FRONTEND ########################################################## - ########################################################################## - - name: Frontend | Lint - run: docker run --rm gradido/frontend:test yarn run lint + # lint_frontend: + # name: Lint - Frontend + # runs-on: ubuntu-latest + # needs: [build_test_frontend] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGE ################################################## + # ########################################################################## + # - name: Download Docker Image (Frontend) + # uses: actions/download-artifact@v3 + # with: + # name: docker-frontend-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/frontend.tar + # ########################################################################## + # # LINT FRONTEND ########################################################## + # ########################################################################## + # - name: Frontend | Lint + # run: docker run --rm gradido/frontend:test yarn run lint ############################################################################## # JOB: STYLELINT FRONTEND #################################################### ############################################################################## - stylelint_frontend: - name: Stylelint - Frontend - runs-on: ubuntu-latest - needs: [build_test_frontend] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGE ################################################## - ########################################################################## - - name: Download Docker Image (Frontend) - uses: actions/download-artifact@v3 - with: - name: docker-frontend-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/frontend.tar - ########################################################################## - # STYLELINT FRONTEND ##################################################### - ########################################################################## - - name: Frontend | Stylelint - run: docker run --rm gradido/frontend:test yarn run stylelint + # stylelint_frontend: + # name: Stylelint - Frontend + # runs-on: ubuntu-latest + # needs: [build_test_frontend] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGE ################################################## + # ########################################################################## + # - name: Download Docker Image (Frontend) + # uses: actions/download-artifact@v3 + # with: + # name: docker-frontend-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/frontend.tar + # ########################################################################## + # # STYLELINT FRONTEND ##################################################### + # ########################################################################## + # - name: Frontend | Stylelint + # run: docker run --rm gradido/frontend:test yarn run stylelint ############################################################################## # JOB: LINT ADMIN INTERFACE ################################################## ############################################################################## - lint_admin: - name: Lint - Admin Interface - runs-on: ubuntu-latest - needs: [build_test_admin] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGE ################################################## - ########################################################################## - - name: Download Docker Image (Admin Interface) - uses: actions/download-artifact@v3 - with: - name: docker-admin-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/admin.tar - ########################################################################## - # LINT ADMIN INTERFACE ################################################### - ########################################################################## - - name: Admin Interface | Lint - run: docker run --rm gradido/admin:test yarn run lint + # lint_admin: + # name: Lint - Admin Interface + # runs-on: ubuntu-latest + # needs: [build_test_admin] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGE ################################################## + # ########################################################################## + # - name: Download Docker Image (Admin Interface) + # uses: actions/download-artifact@v3 + # with: + # name: docker-admin-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/admin.tar + # ########################################################################## + # # LINT ADMIN INTERFACE ################################################### + # ########################################################################## + # - name: Admin Interface | Lint + # run: docker run --rm gradido/admin:test yarn run lint ############################################################################## # JOB: STYLELINT ADMIN INTERFACE ############################################## ############################################################################## - stylelint_admin: - name: Stylelint - Admin Interface - runs-on: ubuntu-latest - needs: [build_test_admin] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGE ################################################## - ########################################################################## - - name: Download Docker Image (Admin Interface) - uses: actions/download-artifact@v3 - with: - name: docker-admin-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/admin.tar - ########################################################################## - # STYLELINT ADMIN INTERFACE ############################################## - ########################################################################## - - name: Admin Interface | Stylelint - run: docker run --rm gradido/admin:test yarn run stylelint + # stylelint_admin: + # name: Stylelint - Admin Interface + # runs-on: ubuntu-latest + # needs: [build_test_admin] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGE ################################################## + # ########################################################################## + # - name: Download Docker Image (Admin Interface) + # uses: actions/download-artifact@v3 + # with: + # name: docker-admin-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/admin.tar + # ########################################################################## + # # STYLELINT ADMIN INTERFACE ############################################## + # ########################################################################## + # - name: Admin Interface | Stylelint + # run: docker run --rm gradido/admin:test yarn run stylelint ############################################################################## # JOB: LOCALES ADMIN ######################################################### ############################################################################## - locales_admin: - name: Locales - Admin Interface - runs-on: ubuntu-latest - needs: [build_test_admin] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGE ################################################## - ########################################################################## - - name: Download Docker Image (Admin Interface) - uses: actions/download-artifact@v3 - with: - name: docker-admin-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/admin.tar - ########################################################################## - # LOCALES FRONTEND ####################################################### - ########################################################################## - - name: admin | Locales - run: docker run --rm gradido/admin:test yarn run locales + # locales_admin: + # name: Locales - Admin Interface + # runs-on: ubuntu-latest + # needs: [build_test_admin] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGE ################################################## + # ########################################################################## + # - name: Download Docker Image (Admin Interface) + # uses: actions/download-artifact@v3 + # with: + # name: docker-admin-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/admin.tar + # ########################################################################## + # # LOCALES FRONTEND ####################################################### + # ########################################################################## + # - name: admin | Locales + # run: docker run --rm gradido/admin:test yarn run locales ############################################################################## # JOB: LINT BACKEND ########################################################## ############################################################################## - lint_backend: - name: Lint - Backend - runs-on: ubuntu-latest - needs: [build_test_backend] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGE ################################################## - ########################################################################## - - name: Download Docker Image (Backend) - uses: actions/download-artifact@v3 - with: - name: docker-backend-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/backend.tar - ########################################################################## - # LINT BACKEND ########################################################### - ########################################################################## - - name: backend | Lint - run: docker run --rm gradido/backend:test yarn run lint + # lint_backend: + # name: Lint - Backend + # runs-on: ubuntu-latest + # needs: [build_test_backend] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGE ################################################## + # ########################################################################## + # - name: Download Docker Image (Backend) + # uses: actions/download-artifact@v3 + # with: + # name: docker-backend-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/backend.tar + # ########################################################################## + # # LINT BACKEND ########################################################### + # ########################################################################## + # - name: backend | Lint + # run: docker run --rm gradido/backend:test yarn run lint ############################################################################## # JOB: LINT DATABASE UP ###################################################### ############################################################################## - lint_database_up: - name: Lint - Database Up - runs-on: ubuntu-latest - needs: [build_test_database_up] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGE ################################################## - ########################################################################## - - name: Download Docker Image (Backend) - uses: actions/download-artifact@v3 - with: - name: docker-database-test_up - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/database_up.tar - ########################################################################## - # LINT DATABASE ########################################################## - ########################################################################## - - name: database | Lint - run: docker run --rm gradido/database:test_up yarn run lint + # lint_database_up: + # name: Lint - Database Up + # runs-on: ubuntu-latest + # needs: [build_test_database_up] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGE ################################################## + # ########################################################################## + # - name: Download Docker Image (Backend) + # uses: actions/download-artifact@v3 + # with: + # name: docker-database-test_up + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/database_up.tar + # ########################################################################## + # # LINT DATABASE ########################################################## + # ########################################################################## + # - name: database | Lint + # run: docker run --rm gradido/database:test_up yarn run lint ############################################################################## # JOB: UNIT TEST FRONTEND ################################################### ############################################################################## - unit_test_frontend: - name: Unit tests - Frontend - runs-on: ubuntu-latest - needs: [build_test_frontend] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGES ################################################# - ########################################################################## - - name: Download Docker Image (Frontend) - uses: actions/download-artifact@v3 - with: - name: docker-frontend-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/frontend.tar - ########################################################################## - # UNIT TESTS FRONTEND #################################################### - ########################################################################## - - name: frontend | Unit tests - run: | - docker run --env NODE_ENV=test -v ~/coverage:/app/coverage --rm gradido/frontend:test yarn run test - cp -r ~/coverage ./coverage - ########################################################################## - # COVERAGE REPORT FRONTEND ############################################### - ########################################################################## - #- 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: webcraftmedia/coverage-check-action@master - with: - report_name: Coverage Frontend - type: lcov - result_path: ./coverage/lcov.info - min_coverage: 95 - token: ${{ github.token }} + # unit_test_frontend: + # name: Unit tests - Frontend + # runs-on: ubuntu-latest + # needs: [build_test_frontend] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGES ################################################# + # ########################################################################## + # - name: Download Docker Image (Frontend) + # uses: actions/download-artifact@v3 + # with: + # name: docker-frontend-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/frontend.tar + # ########################################################################## + # # UNIT TESTS FRONTEND #################################################### + # ########################################################################## + # - name: frontend | Unit tests + # run: | + # docker run --env NODE_ENV=test -v ~/coverage:/app/coverage --rm gradido/frontend:test yarn run test + # cp -r ~/coverage ./coverage + # ########################################################################## + # # COVERAGE REPORT FRONTEND ############################################### + # ########################################################################## + # #- 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: webcraftmedia/coverage-check-action@master + # with: + # report_name: Coverage Frontend + # type: lcov + # result_path: ./coverage/lcov.info + # min_coverage: 95 + # token: ${{ github.token }} ############################################################################## # JOB: UNIT TEST ADMIN INTERFACE ############################################# ############################################################################## - unit_test_admin: - name: Unit tests - Admin Interface - runs-on: ubuntu-latest - needs: [build_test_admin] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGES ################################################# - ########################################################################## - - name: Download Docker Image (Admin Interface) - uses: actions/download-artifact@v3 - with: - name: docker-admin-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/admin.tar - ########################################################################## - # UNIT TESTS ADMIN INTERFACE ############################################# - ########################################################################## - - name: Admin Interface | Unit tests - run: | - docker run -v ~/coverage:/app/coverage --rm gradido/admin:test yarn run test - cp -r ~/coverage ./coverage - ########################################################################## - # COVERAGE CHECK ADMIN INTERFACE ######################################### - ########################################################################## - - name: Admin Interface | Coverage check - uses: webcraftmedia/coverage-check-action@master - with: - report_name: Coverage Admin Interface - type: lcov - result_path: ./coverage/lcov.info - min_coverage: 96 - token: ${{ github.token }} + # unit_test_admin: + # name: Unit tests - Admin Interface + # runs-on: ubuntu-latest + # needs: [build_test_admin] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGES ################################################# + # ########################################################################## + # - name: Download Docker Image (Admin Interface) + # uses: actions/download-artifact@v3 + # with: + # name: docker-admin-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/admin.tar + # ########################################################################## + # # UNIT TESTS ADMIN INTERFACE ############################################# + # ########################################################################## + # - name: Admin Interface | Unit tests + # run: | + # docker run -v ~/coverage:/app/coverage --rm gradido/admin:test yarn run test + # cp -r ~/coverage ./coverage + # ########################################################################## + # # COVERAGE CHECK ADMIN INTERFACE ######################################### + # ########################################################################## + # - name: Admin Interface | Coverage check + # uses: webcraftmedia/coverage-check-action@master + # with: + # report_name: Coverage Admin Interface + # type: lcov + # result_path: ./coverage/lcov.info + # min_coverage: 96 + # token: ${{ github.token }} ############################################################################## # JOB: UNIT TEST BACKEND #################################################### ############################################################################## - unit_test_backend: - name: Unit tests - Backend - runs-on: ubuntu-latest - needs: [build_test_mariadb] - steps: - ########################################################################## - # CHECKOUT CODE ########################################################## - ########################################################################## - - name: Checkout code - uses: actions/checkout@v3 - ########################################################################## - # DOWNLOAD DOCKER IMAGES ################################################# - ########################################################################## - - name: Download Docker Image (Mariadb) - uses: actions/download-artifact@v3 - with: - name: docker-mariadb-test - path: /tmp - - name: Load Docker Image - run: docker load < /tmp/mariadb.tar - ########################################################################## - # UNIT TESTS BACKEND ##################################################### - ########################################################################## - - name: backend | docker-compose mariadb - run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb - - 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: backend Unit tests | 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 - ########################################################################## - # COVERAGE CHECK BACKEND ################################################# - ########################################################################## - - name: backend | Coverage check - uses: webcraftmedia/coverage-check-action@master - with: - report_name: Coverage Backend - type: lcov - result_path: ./backend/coverage/lcov.info - min_coverage: 78 - token: ${{ github.token }} + # unit_test_backend: + # name: Unit tests - Backend + # runs-on: ubuntu-latest + # needs: [build_test_mariadb] + # steps: + # ########################################################################## + # # CHECKOUT CODE ########################################################## + # ########################################################################## + # - name: Checkout code + # uses: actions/checkout@v3 + # ########################################################################## + # # DOWNLOAD DOCKER IMAGES ################################################# + # ########################################################################## + # - name: Download Docker Image (Mariadb) + # uses: actions/download-artifact@v3 + # with: + # name: docker-mariadb-test + # path: /tmp + # - name: Load Docker Image + # run: docker load < /tmp/mariadb.tar + # ########################################################################## + # # UNIT TESTS BACKEND ##################################################### + # ########################################################################## + # - name: backend | docker-compose mariadb + # run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mariadb + # - 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: backend Unit tests | 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 + # ########################################################################## + # # COVERAGE CHECK BACKEND ################################################# + # ########################################################################## + # - name: backend | Coverage check + # uses: webcraftmedia/coverage-check-action@master + # with: + # report_name: Coverage Backend + # type: lcov + # result_path: ./backend/coverage/lcov.info + # min_coverage: 78 + # token: ${{ github.token }} ########################################################################## # DATABASE MIGRATION TEST UP + RESET ##################################### @@ -624,17 +624,10 @@ jobs: run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps database - name: Boot up test system | docker-compose backend - run: | - docker run -i --rm gradido/backend:test /bin/sh - cd backend - cp .env.test_email .env && exit - docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps backend + run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps backend - - name: Boot up test system | docker-compose mailserver - run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps mailserver - - - name: Sleep for 5 seconds - run: sleep 5s + - name: Sleep for 10 seconds + run: sleep 10s - name: Boot up test system | seed backend run: |