From 18ba88a075ce8bc8ab5ce30881bda72c3e8424a6 Mon Sep 17 00:00:00 2001 From: BacLuc Date: Wed, 15 Nov 2023 22:16:05 +0100 Subject: [PATCH] continuous-integration.yml: use github action to send js coveralls reports That we don't use the npm package coveralls anymore. Coveralls did not receive updates for some time. Coveralls.io wants to move to the universal coverage reporter (https://docs.coveralls.io/integrations#official-integrations), which the github action uses. The npm package has some dependencies which have moderate security issues: https://github.com/ecamp/ecamp3/security/dependabot/165 https://github.com/ecamp/ecamp3/security/dependabot/153 Also add pdf-tests as dependency to coveralls-finished. Pin the coveralls action in coveralls-finished. Do not fail our builds if coveralls is not online right now. --- .github/workflows/continuous-integration.yml | 56 ++++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ff0ea3d6dc3..f49664e4ec2 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -277,17 +277,16 @@ jobs: - run: npm run test:unit working-directory: frontend - - name: send coverage info + - name: replace paths in lcov.info that they reflect repo path run: | sed -i "s|src/|frontend/src/|g" frontend/data/coverage/lcov.info - cat frontend/data/coverage/lcov.info | npx coveralls . - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_SERVICE_NAME: github - COVERALLS_SERVICE_NUMBER: ${{ github.run_id }} - CI_PULL_REQUEST: ${{ github.event.number }} - COVERALLS_PARALLEL: true - COVERALLS_FLAG_NAME: frontend + + - name: Coveralls Parallel + uses: coverallsapp/github-action@v2 + with: + flag-name: frontend + parallel: true + fail-on-error: false print-tests: name: 'Tests: Print' @@ -317,17 +316,16 @@ jobs: - run: npm run test working-directory: print - - name: send coverage info + - name: replace paths in lcov.info that they reflect repo path run: | sed -i "s|SF:|SF:print/|g" print/coverage/lcov.info - cat print/coverage/lcov.info | npx coveralls . - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_SERVICE_NAME: github - COVERALLS_SERVICE_NUMBER: ${{ github.run_id }} - CI_PULL_REQUEST: ${{ github.event.number }} - COVERALLS_PARALLEL: true - COVERALLS_FLAG_NAME: print + + - name: Coveralls Parallel + uses: coverallsapp/github-action@v2 + with: + flag-name: print + parallel: true + fail-on-error: false pdf-tests: name: 'Tests: PDF' @@ -355,17 +353,16 @@ jobs: - run: npm run test:unit working-directory: pdf - - name: send coverage info + - name: replace paths in lcov.info that they reflect repo path run: | sed -i "s|src/|pdf/src/|g" pdf/data/coverage/lcov.info - cat pdf/data/coverage/lcov.info | npx coveralls . - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_SERVICE_NAME: github - COVERALLS_SERVICE_NUMBER: ${{ github.run_id }} - CI_PULL_REQUEST: ${{ github.event.number }} - COVERALLS_PARALLEL: true - COVERALLS_FLAG_NAME: pdf + + - name: Coveralls Parallel + uses: coverallsapp/github-action@v2 + with: + flag-name: pdf + parallel: true + fail-on-error: false e2e-tests-build: name: 'Tests: End-to-end (build job)' @@ -482,12 +479,15 @@ jobs: - api-tests - frontend-tests - print-tests + - pdf-tests runs-on: ubuntu-latest steps: - - uses: coverallsapp/github-action@master + - uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true + carryforward: "api,frontend,print,pdf" + fail-on-error: false ci-passed-event: name: 'Send out CI success event'