Merge pull request #4457 from consul/coveralls

Integrate Coveralls with Github Actions
This commit is contained in:
Javi Martín
2021-04-06 18:07:33 +02:00
committed by GitHub
3 changed files with 14 additions and 3 deletions

View File

@@ -1 +0,0 @@
service_name: travis-ci

View File

@@ -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"

View File

@@ -1,5 +1,5 @@
ENV["RAILS_ENV"] ||= "test"
if ENV["COVERALLS"]
if ENV["COVERALLS_REPO_TOKEN"]
require "coveralls"
Coveralls.wear!("rails")
end