Skip to content

Commit

Permalink
continuous-integration.yml: use github action to send js coveralls re…
Browse files Browse the repository at this point in the history
…ports

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.
  • Loading branch information
BacLuc committed Nov 15, 2023
1 parent 13d2589 commit 18ba88a
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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)'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 18ba88a

Please sign in to comment.