github+travis: split CI tasks between Travis and GitHub

To free up build in Travis, we decided to run the non-flaky parts of
the CI pipeline in GitHub Workflows/Actions only. The integration tests
on the other hand are removed from GitHub because individual actions
cannot be restarted there which caused us to restart the whole workflow
if one test was flaky.

This split should give us the best of both worlds: Fast run of small
checks, linting and unit tests with an easy overview of what failed in
the PR directly. And more free build slots on Travis to do more advanced
integration tests on other architectures and/or operating systems. And
the option to restart a single flaky integration test on Travis.
This commit is contained in:
Oliver Gugger 2020-07-23 15:06:05 +02:00
parent 8d2a3ce8ac
commit 17b8b7ea0c
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
2 changed files with 13 additions and 88 deletions

View File

@ -255,63 +255,3 @@ jobs:
with:
path-to-profile: coverage.txt
parallel: true
########################
# run integration tests
########################
integration-test:
name: run integration tests
runs-on: ubuntu-latest
strategy:
# Allow other tests in the matrix to continue if one fails.
fail-fast: false
matrix:
backend:
- btcd
- bitcoind
- neutrino
steps:
- name: git checkout
uses: actions/checkout@v2
- name: go cache
uses: actions/cache@v1
with:
path: /home/runner/work/go
key: lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lnd-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lnd-${{ runner.os }}-go-
- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
with:
go-version: '~${{ env.GO_VERSION }}'
- name: bitcoin cache
uses: actions/cache@v1
with:
path: /home/runner/bitcoin/bitcoin-${{ env.BITCOIN_VERSION }}/bin
key: lnd-${{ runner.os }}-bitcoin-${{ env.BITCOIN_VERSION }}
restore-keys: |
lnd-${{ runner.os }}-bitcoin-${{ env.BITCOIN_VERSION }}
- name: install bitcoind
run: bash ./scripts/install_bitcoind.sh
if: matrix.backend == 'bitcoind'
- name: ${{ matrix.backend }} integration
run: make itest backend=${{ matrix.backend }}
- name: package logfiles
run: tar -zcvf itest-logs-${{ matrix.backend }}.tar.gz lntest/itest/*.log
if: failure()
- name: upload logfiles
uses: actions/upload-artifact@v1
if: failure()
with:
name: itest-logs-${{ matrix.backend }}
path: itest-logs-${{ matrix.backend }}.tar.gz

View File

@ -26,37 +26,22 @@ env:
sudo: required
addons:
apt:
packages:
- clang-format
before_script:
- bash ./scripts/install_travis_proto.sh
- bash ./scripts/install_bitcoind.sh
jobs:
include:
- stage: Build
script:
- make rpc-check
- make unit pkg=... case=_NONE_
- make lint workers=1
- make btcd
- make release sys=windows-amd64
- make mobile-rpc
- go build --tags="mobile" ./mobile
- stage: Test
script: make travis-cover
name: Unit Cover
- script: make travis-race
name: Unit Race
- script: make itest
- stage: Integration Test
name: Btcd Integration
- script: make itest backend=bitcoind
name: Bitcoind Integration
- script: make itest backend=neutrino
name: Neutrino Integration
script:
- make itest
- name: Bitcoind Integration
script:
- bash ./scripts/install_bitcoind.sh
- make itest backend=bitcoind
- name: Neutrino Integration
script:
- make itest backend=neutrino
after_script:
- LOG_FILES=./lntest/itest/*.log