Integrate coveralls with github actions
Somehow I thought it worked automatically, but we had to provide the token. The configuration is based on Coveralls instructions to run parallel builds [1]. Alternatively we could use the Coveralls GitHub Action [2] which slightly simplifies the workflow configuration and removes the dependency of the coveralls gem. However, it also adds a dependency on simplecov-lcov and requires configuring it to renerate LCOV files on each run, so the benefits of using it are not that big. [1] https://docs.coveralls.io/parallel-build-webhook [2] https://github.com/coverallsapp/github-action/
This commit is contained in:
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
@@ -19,10 +19,13 @@ jobs:
|
||||
POSTGRES_USER: consul
|
||||
POSTGRES_PASSWORD: ""
|
||||
env:
|
||||
CI_BUILD_NUMBER: ${{ github.run_number }}
|
||||
COVERALLS_FLAG_NAME: run-${{ matrix.ci_node_index }}
|
||||
COVERALLS_PARALLEL: true
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
PGUSER: consul
|
||||
POSTGRES_HOST: postgres
|
||||
RAILS_ENV: test
|
||||
COVERALLS: true
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -55,3 +58,12 @@ jobs:
|
||||
with:
|
||||
name: screenshots
|
||||
path: tmp/screenshots
|
||||
coveralls:
|
||||
runs-on: ubuntu-18.04
|
||||
needs: tests
|
||||
env:
|
||||
CI_BUILD_NUMBER: ${{ github.run_number }}
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
steps:
|
||||
- name: Finish coveralls
|
||||
run: curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CI_BUILD_NUMBER&payload[status]=done"
|
||||
|
||||
Reference in New Issue
Block a user