Run blockbeat
PRs as a whole
#397
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "*" | |
merge_group: | |
branches: | |
- "master" | |
concurrency: | |
# Cancel any previous workflows if they are from a PR or push. | |
group: ${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
env: | |
BITCOIN_VERSION: "28" | |
TRANCHES: 8 | |
# If you change this value, please change it in the following files as well: | |
# /.travis.yml | |
# /Dockerfile | |
# /dev.Dockerfile | |
# /make/builder.Dockerfile | |
# /.github/workflows/release.yml | |
GO_VERSION: 1.22.6 | |
jobs: | |
######################## | |
# run ubuntu integration tests | |
######################## | |
ubuntu-integration-test: | |
name: run ubuntu itests | |
runs-on: ubuntu-latest | |
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')' | |
strategy: | |
# Allow other tests in the matrix to continue if one fails. | |
fail-fast: false | |
matrix: | |
include: | |
- name: btcd | |
args: backend=btcd cover=1 | |
- name: bitcoind | |
args: backend=bitcoind cover=1 | |
- name: bitcoind-notxindex | |
args: backend="bitcoind notxindex" | |
- name: bitcoind-rpcpolling | |
args: backend="bitcoind rpcpolling" cover=1 | |
- name: bitcoind-etcd | |
args: backend=bitcoind dbbackend=etcd | |
- name: bitcoind-postgres | |
args: backend=bitcoind dbbackend=postgres | |
- name: bitcoind-sqlite | |
args: backend=bitcoind dbbackend=sqlite | |
- name: bitcoind-postgres-nativesql | |
args: backend=bitcoind dbbackend=postgres nativesql=true | |
- name: bitcoind-sqlite-nativesql | |
args: backend=bitcoind dbbackend=sqlite nativesql=true | |
- name: neutrino | |
args: backend=neutrino cover=1 | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: fetch and rebase on ${{ github.base_ref }} | |
if: github.event_name == 'pull_request' | |
uses: ./.github/actions/rebase | |
- name: setup go ${{ env.GO_VERSION }} | |
uses: ./.github/actions/setup-go | |
with: | |
go-version: '${{ env.GO_VERSION }}' | |
key-prefix: integration-test | |
- name: install bitcoind | |
run: ./scripts/install_bitcoind.sh $BITCOIN_VERSION | |
- name: run ${{ matrix.name }} | |
run: make itest-parallel tranches=${{ env.TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }} | |
- name: Send coverage | |
if: ${{ contains(matrix.args, 'cover=1') }} | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: coverage.txt | |
flag-name: 'itest-${{ matrix.name }}' | |
parallel: true | |
- name: Zip log files on failure | |
if: ${{ failure() }} | |
timeout-minutes: 5 # timeout after 5 minute | |
run: 7z a logs-itest-${{ matrix.name }}.zip itest/**/*.log | |
- name: Upload log files on failure | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: logs-itest-${{ matrix.name }} | |
path: logs-itest-${{ matrix.name }}.zip | |
retention-days: 5 | |
######################## | |
# run windows integration test | |
######################## | |
windows-integration-test: | |
name: run windows itest | |
runs-on: windows-latest | |
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')' | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: fetch and rebase on ${{ github.base_ref }} | |
if: github.event_name == 'pull_request' | |
uses: ./.github/actions/rebase | |
- name: setup go ${{ env.GO_VERSION }} | |
uses: ./.github/actions/setup-go | |
with: | |
go-version: '${{ env.GO_VERSION }}' | |
key-prefix: integration-test | |
- name: run itest | |
run: make itest-parallel tranches=${{ env.TRANCHES }} windows=1 shuffleseed=${{ github.run_id }} | |
- name: kill any remaining lnd processes | |
if: ${{ failure() }} | |
shell: powershell | |
run: taskkill /IM lnd-itest.exe /T /F | |
- name: Zip log files on failure | |
if: ${{ failure() }} | |
timeout-minutes: 5 # timeout after 5 minute | |
run: 7z a logs-itest-windows.zip itest/**/*.log | |
- name: Upload log files on failure | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: logs-itest-windows | |
path: logs-itest-windows.zip | |
retention-days: 5 | |
######################## | |
# run macOS integration test | |
######################## | |
macos-integration-test: | |
name: run macOS itest | |
runs-on: macos-14 | |
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')' | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: fetch and rebase on ${{ github.base_ref }} | |
if: github.event_name == 'pull_request' | |
uses: ./.github/actions/rebase | |
- name: setup go ${{ env.GO_VERSION }} | |
uses: ./.github/actions/setup-go | |
with: | |
go-version: '${{ env.GO_VERSION }}' | |
key-prefix: integration-test | |
- name: run itest | |
run: PATH=$PATH:/tmp/bitcoin/bin make itest-parallel tranches=${{ env.TRANCHES }} shuffleseed=${{ github.run_id }} | |
- name: Zip log files on failure | |
if: ${{ failure() }} | |
timeout-minutes: 5 # timeout after 5 minute | |
run: 7z a logs-itest-macos.zip itest/**/*.log | |
- name: Upload log files on failure | |
uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: logs-itest-macos | |
path: logs-itest-macos.zip | |
retention-days: 5 | |
# Notify about the completion of all coverage collecting jobs. | |
finish: | |
if: ${{ always() }} | |
needs: [ubuntu-integration-test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: shogo82148/actions-goveralls@v1 | |
with: | |
parallel-finished: true |