From 7766187d296611945ad8798f82282be6217c8f09 Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 16 Feb 2023 15:06:25 +0100 Subject: [PATCH 1/6] remove docker dependendies from locales jobs --- .github/workflows/test.yml | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7819a0703..5cab713ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -163,7 +163,6 @@ jobs: locales_frontend: name: Locales - Frontend runs-on: ubuntu-latest - needs: [build_test_frontend] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -171,20 +170,10 @@ jobs: - 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 - ########################################################################## # LOCALES FRONTEND ####################################################### ########################################################################## - name: Frontend | Locales - run: docker run --rm gradido/frontend:test yarn run locales + run: cd frontend && yarn && yarn run locales ############################################################################## # JOB: LINT FRONTEND ######################################################### @@ -308,7 +297,6 @@ jobs: locales_admin: name: Locales - Admin Interface runs-on: ubuntu-latest - needs: [build_test_admin] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -316,20 +304,10 @@ jobs: - 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 + - name: Admin | Locales + run: cd admin && yarn && yarn run locales ############################################################################## # JOB: LINT BACKEND ########################################################## @@ -366,7 +344,6 @@ jobs: locales_backend: name: Locales - Backend runs-on: ubuntu-latest - needs: [build_test_backend] steps: ########################################################################## # CHECKOUT CODE ########################################################## From f12fea24330fecd52a7011bcf78c76b9e96fe4bf Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 16 Feb 2023 15:15:25 +0100 Subject: [PATCH 2/6] remove docker dependendies from linting jobs --- .github/workflows/test.yml | 82 ++++---------------------------------- 1 file changed, 8 insertions(+), 74 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5cab713ad..9a3895093 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -181,7 +181,6 @@ jobs: lint_frontend: name: Lint - Frontend runs-on: ubuntu-latest - needs: [build_test_frontend] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -189,20 +188,10 @@ jobs: - 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 + run: cd frontend && yarn && yarn run lint ############################################################################## # JOB: STYLELINT FRONTEND #################################################### @@ -210,7 +199,6 @@ jobs: stylelint_frontend: name: Stylelint - Frontend runs-on: ubuntu-latest - needs: [build_test_frontend] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -218,20 +206,10 @@ jobs: - 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 + run: cd frontend && yarn && yarn run stylelint ############################################################################## # JOB: LINT ADMIN INTERFACE ################################################## @@ -239,7 +217,6 @@ jobs: lint_admin: name: Lint - Admin Interface runs-on: ubuntu-latest - needs: [build_test_admin] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -247,28 +224,17 @@ jobs: - 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 + run: cd admin && yarn && yarn run lint ############################################################################## - # JOB: STYLELINT ADMIN INTERFACE ############################################## + # JOB: STYLELINT ADMIN INTERFACE ############################################# ############################################################################## stylelint_admin: name: Stylelint - Admin Interface runs-on: ubuntu-latest - needs: [build_test_admin] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -276,20 +242,10 @@ jobs: - 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 + run: cd admin && yarn && yarn run stylelint ############################################################################## # JOB: LOCALES ADMIN ######################################################### @@ -315,7 +271,6 @@ jobs: lint_backend: name: Lint - Backend runs-on: ubuntu-latest - needs: [build_test_backend] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -323,20 +278,10 @@ jobs: - 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 + run: cd backend && yarn && yarn run lint ############################################################################## # JOB: LOCALES BACKEND ####################################################### @@ -362,7 +307,6 @@ jobs: lint_database_up: name: Lint - Database Up runs-on: ubuntu-latest - needs: [build_test_database_up] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -370,20 +314,10 @@ jobs: - 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 + - name: Database | Lint + run: cd database && yarn && yarn run lint ############################################################################## # JOB: UNIT TEST FRONTEND ################################################### From baccc83f0016a571e31ef7dad649f95d74551b59 Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 16 Feb 2023 16:33:49 +0100 Subject: [PATCH 3/6] remove docker dependendies from unit test jobs --- .github/workflows/test.yml | 40 +++----------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9a3895093..a29792a7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -325,7 +325,6 @@ jobs: unit_test_frontend: name: Unit tests - Frontend runs-on: ubuntu-latest - needs: [build_test_frontend] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -333,30 +332,10 @@ jobs: - 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 + - name: Frontend | Unit tests + run: cd frontend && yarn && yarn run test ########################################################################## # COVERAGE CHECK FRONTEND ################################################ ########################################################################## @@ -375,7 +354,6 @@ jobs: unit_test_admin: name: Unit tests - Admin Interface runs-on: ubuntu-latest - needs: [build_test_admin] steps: ########################################################################## # CHECKOUT CODE ########################################################## @@ -383,22 +361,10 @@ jobs: - 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 + run: cd admin && yarn && yarn run test ########################################################################## # COVERAGE CHECK ADMIN INTERFACE ######################################### ########################################################################## From f5c44e8ca3b40c6e85cb5f3e3a26bcdfee257052 Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 16 Feb 2023 16:59:03 +0100 Subject: [PATCH 4/6] adapt paths for unit test coverage jobs --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a29792a7d..2e55ba47e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -344,7 +344,7 @@ jobs: with: report_name: Coverage Frontend type: lcov - result_path: ./coverage/lcov.info + result_path: ./frontend/coverage/lcov.info min_coverage: 95 token: ${{ github.token }} @@ -373,7 +373,7 @@ jobs: with: report_name: Coverage Admin Interface type: lcov - result_path: ./coverage/lcov.info + result_path: ./admin/coverage/lcov.info min_coverage: 96 token: ${{ github.token }} From a5fde7361cbbbd906a6a319bed019a0630ffb0af Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 16 Feb 2023 20:57:15 +0100 Subject: [PATCH 5/6] fix result path for admin unit test coverage ingo --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b3c15ddea..c2dd3a3b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -373,7 +373,7 @@ jobs: with: report_name: Coverage Admin Interface type: lcov - result_path: ./coverage/lcov.info + result_path: ./admin/coverage/lcov.info min_coverage: 97 token: ${{ github.token }} From de6834a6f0aea5a911d9e6a44811b204d0984160 Mon Sep 17 00:00:00 2001 From: mahula Date: Fri, 17 Feb 2023 02:35:24 +0100 Subject: [PATCH 6/6] add copying of coverage info for check --- .github/workflows/test.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c2dd3a3b0..badb47e87 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -335,7 +335,9 @@ jobs: # UNIT TESTS FRONTEND #################################################### ########################################################################## - name: Frontend | Unit tests - run: cd frontend && yarn && yarn run test + run: | + cd frontend && yarn && yarn run test + cp -r ./coverage ../ ########################################################################## # COVERAGE CHECK FRONTEND ################################################ ########################################################################## @@ -364,7 +366,9 @@ jobs: # UNIT TESTS ADMIN INTERFACE ############################################# ########################################################################## - name: Admin Interface | Unit tests - run: cd admin && yarn && yarn run test + run: | + cd admin && yarn && yarn run test + cp -r ./coverage ../ ########################################################################## # COVERAGE CHECK ADMIN INTERFACE ######################################### ########################################################################## @@ -411,8 +415,9 @@ jobs: - 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 + run: | + cd database && yarn && yarn build && cd ../backend && yarn && yarn test + cp -r ./coverage ../ ########################################################################## # COVERAGE CHECK BACKEND ################################################# ##########################################################################