Skip to content

Commit

Permalink
GitHub: only run cover on some itests, send completion
Browse files Browse the repository at this point in the history
We only want to run the coverage on some select tests, since we don't
want to make tests with slow backends even slower.
And because we use "parallel: true" when uploading the coverage results,
those will only be assembled once we send "parallel-finished: true"
using the goveralls action.
So we do that with a new "finish" job.
  • Loading branch information
guggero committed Mar 21, 2024
1 parent 4e6fcc4 commit 6459da4
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/main.yml
Expand Up @@ -242,12 +242,15 @@ jobs:
include:
- name: btcd
args: backend=btcd
cover: true
- name: bitcoind
args: backend=bitcoind
cover: true
- name: bitcoind-notxindex
args: backend="bitcoind notxindex"
- name: bitcoind-rpcpolling
args: backend="bitcoind rpcpolling"
cover: true
- name: bitcoind-etcd
args: backend=bitcoind dbbackend=etcd
- name: bitcoind-postgres
Expand All @@ -274,12 +277,14 @@ jobs:
run: ./scripts/install_bitcoind.sh $BITCOIN_VERSION

- name: run ${{ matrix.name }}
run: make itest-parallel ${{ matrix.args }} cover=true
run: make itest-parallel ${{ matrix.args }} ${{ matrix.cover == true && 'cover=1' || '' }}

- name: convert coverage data
if: ${{ matrix.cover == true }}
run: go tool covdata textfmt -i=itest/cover -o itest/coverage.txt

- name: Send coverage
if: ${{ matrix.cover == true }}
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: itest/coverage.txt
Expand Down Expand Up @@ -410,3 +415,13 @@ jobs:

- name: release notes check
run: scripts/check-release-notes.sh

# Notify about the completion of all coverage collecting jobs.
finish:
if: ${{ always() }}
needs: [unit-test, ubuntu-integration-test]
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true

0 comments on commit 6459da4

Please sign in to comment.