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:
parent
8d2a3ce8ac
commit
17b8b7ea0c
60
.github/workflows/main.yml
vendored
60
.github/workflows/main.yml
vendored
@ -255,63 +255,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path-to-profile: coverage.txt
|
path-to-profile: coverage.txt
|
||||||
parallel: true
|
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
|
|
||||||
|
41
.travis.yml
41
.travis.yml
@ -26,37 +26,22 @@ env:
|
|||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- clang-format
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- bash ./scripts/install_travis_proto.sh
|
|
||||||
- bash ./scripts/install_bitcoind.sh
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: Build
|
- stage: Integration Test
|
||||||
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
|
|
||||||
name: Btcd Integration
|
name: Btcd Integration
|
||||||
- script: make itest backend=bitcoind
|
script:
|
||||||
name: Bitcoind Integration
|
- make itest
|
||||||
- script: make itest backend=neutrino
|
|
||||||
name: Neutrino Integration
|
- name: Bitcoind Integration
|
||||||
|
script:
|
||||||
|
- bash ./scripts/install_bitcoind.sh
|
||||||
|
- make itest backend=bitcoind
|
||||||
|
|
||||||
|
- name: Neutrino Integration
|
||||||
|
script:
|
||||||
|
- make itest backend=neutrino
|
||||||
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- LOG_FILES=./lntest/itest/*.log
|
- LOG_FILES=./lntest/itest/*.log
|
||||||
|
Loading…
Reference in New Issue
Block a user