2020-04-24 11:14:48 +02:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "master"
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "*"
|
2023-02-17 11:14:38 +01:00
|
|
|
merge_group:
|
2023-02-16 14:59:53 -08:00
|
|
|
branches:
|
|
|
|
- "master"
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2022-08-18 03:29:32 +08:00
|
|
|
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
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
env:
|
2024-09-02 18:09:37 +02:00
|
|
|
BITCOIN_VERSION: "28"
|
2024-05-30 11:54:10 +02:00
|
|
|
|
2024-12-05 17:29:54 +08:00
|
|
|
# TRANCHES defines the number of tranches used in the itests.
|
|
|
|
TRANCHES: 16
|
|
|
|
|
|
|
|
# SMALL_TRANCHES defines the number of tranches used in the less stable itest
|
|
|
|
# builds
|
|
|
|
#
|
|
|
|
# TODO(yy): remove this value and use TRANCHES.
|
|
|
|
SMALL_TRANCHES: 8
|
2020-12-12 11:26:00 +01:00
|
|
|
|
2024-12-02 09:48:26 +01:00
|
|
|
# If you change this please also update GO_VERSION in Makefile (then run
|
|
|
|
# `make lint` to see where else it needs to be updated as well).
|
2025-02-12 14:00:16 -08:00
|
|
|
GO_VERSION: 1.23.6
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
jobs:
|
2023-05-30 07:41:42 -07:00
|
|
|
########################
|
|
|
|
# SQLC code gen check
|
|
|
|
########################
|
|
|
|
sqlc-check:
|
|
|
|
name: Sqlc check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2023-05-30 07:41:42 -07:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-05-30 07:41:42 -07:00
|
|
|
|
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
|
|
|
uses: ./.github/actions/setup-go
|
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
|
|
|
|
|
|
|
- name: docker image cache
|
|
|
|
uses: satackey/action-docker-layer-caching@v0.0.11
|
|
|
|
# Ignore the failure of a step and avoid terminating the job.
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
- name: Generate sql models
|
|
|
|
run: make sqlc-check
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
########################
|
2021-01-15 13:44:56 +01:00
|
|
|
# RPC and mobile compilation check
|
2020-04-24 11:14:48 +02:00
|
|
|
########################
|
|
|
|
rpc-check:
|
2021-01-15 13:44:56 +01:00
|
|
|
name: RPC and mobile compilation check
|
2020-04-24 11:14:48 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
- name: run check
|
|
|
|
run: make rpc-check
|
2021-08-03 13:37:58 +02:00
|
|
|
|
|
|
|
- name: run JSON/WASM stub compilation check
|
|
|
|
run: make rpc-js-compile
|
|
|
|
|
2021-01-15 13:44:56 +01:00
|
|
|
- name: build mobile RPC bindings
|
|
|
|
run: make mobile-rpc
|
|
|
|
|
|
|
|
- name: build mobile specific code
|
|
|
|
run: go build --tags="mobile" ./mobile
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
########################
|
2020-12-08 13:36:48 -08:00
|
|
|
# check commits
|
2020-04-24 11:14:48 +02:00
|
|
|
########################
|
2020-12-08 13:36:48 -08:00
|
|
|
check-commits:
|
2022-11-04 11:06:15 +02:00
|
|
|
if: github.event_name == 'pull_request'
|
2020-12-08 13:36:48 -08:00
|
|
|
name: check commits
|
2020-04-24 11:14:48 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-12-08 13:36:48 -08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2022-11-02 08:05:07 +02:00
|
|
|
- name: fetch and rebase on ${{ github.base_ref }}
|
2024-06-11 14:47:19 -04:00
|
|
|
uses: ./.github/actions/rebase
|
2020-12-08 13:36:48 -08:00
|
|
|
|
|
|
|
- name: check commits
|
2022-11-02 08:05:07 +02:00
|
|
|
run: scripts/check-each-commit.sh upstream/${{ github.base_ref }}
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
########################
|
|
|
|
# lint code
|
|
|
|
########################
|
|
|
|
lint:
|
|
|
|
name: lint code
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2022-12-15 16:32:45 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2022-12-15 16:56:06 +08:00
|
|
|
- name: check code format
|
|
|
|
run: make fmt-check
|
|
|
|
|
2023-09-06 02:17:00 +08:00
|
|
|
- name: check go modules tidiness
|
|
|
|
run: make tidy-module-check
|
|
|
|
|
2023-12-25 09:28:40 +02:00
|
|
|
- name: lint proto files
|
|
|
|
run: make protolint
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
- name: lint
|
2021-07-27 13:00:00 +02:00
|
|
|
run: GOGC=50 make lint
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
########################
|
|
|
|
# cross compilation
|
|
|
|
########################
|
|
|
|
cross-compile:
|
|
|
|
name: cross compilation
|
|
|
|
runs-on: ubuntu-latest
|
2024-12-10 19:12:29 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
# Please keep this list in sync with make/release_flags.mk!
|
|
|
|
include:
|
|
|
|
- name: i386
|
|
|
|
sys: freebsd-386 linux-386 windows-386
|
|
|
|
- name: amd64
|
|
|
|
sys: darwin-amd64 freebsd-amd64 linux-amd64 netbsd-amd64 openbsd-amd64 windows-amd64
|
|
|
|
- name: arm
|
|
|
|
sys: darwin-arm64 freebsd-arm linux-armv6 linux-armv7 linux-arm64 windows-arm
|
2020-04-24 11:14:48 +02:00
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2024-03-14 11:14:39 +01:00
|
|
|
key-prefix: cross-compile
|
2024-12-10 19:11:18 +01:00
|
|
|
use-build-cache: 'no'
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2020-11-09 10:21:32 +01:00
|
|
|
- name: build release for all architectures
|
2024-12-10 19:12:29 +01:00
|
|
|
run: make release sys="${{ matrix.sys }}"
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2020-10-08 09:10:59 +02:00
|
|
|
########################
|
|
|
|
# sample configuration check
|
|
|
|
########################
|
|
|
|
sample-conf-check:
|
|
|
|
name: sample configuration check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2020-10-08 09:10:59 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-10-08 09:10:59 +02:00
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2020-10-08 09:10:59 +02:00
|
|
|
|
2023-07-23 08:10:23 +02:00
|
|
|
- name: check default values in sample-lnd.conf file
|
2020-10-08 09:10:59 +02:00
|
|
|
run: make sample-conf-check
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
########################
|
|
|
|
# run unit tests
|
|
|
|
########################
|
|
|
|
unit-test:
|
|
|
|
name: run unit tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
# Allow other tests in the matrix to continue if one fails.
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
unit_type:
|
|
|
|
- btcd unit-cover
|
2021-07-16 18:07:30 +02:00
|
|
|
- unit tags="kvdb_etcd"
|
|
|
|
- unit tags="kvdb_postgres"
|
2022-12-14 11:54:47 +02:00
|
|
|
- unit tags="kvdb_sqlite"
|
2021-11-29 12:52:26 +01:00
|
|
|
- btcd unit-race
|
2023-09-04 19:17:53 +08:00
|
|
|
- unit-module
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2020-04-24 11:14:48 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2024-06-11 14:49:09 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: fetch and rebase on ${{ github.base_ref }}
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
uses: ./.github/actions/rebase
|
2020-04-24 11:14:48 +02:00
|
|
|
|
2023-03-08 13:07:37 -06:00
|
|
|
- name: git checkout fuzzing seeds
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2023-03-08 13:07:37 -06:00
|
|
|
with:
|
|
|
|
repository: lightninglabs/lnd-fuzz
|
|
|
|
path: lnd-fuzz
|
|
|
|
|
|
|
|
- name: rsync fuzzing seeds
|
|
|
|
run: rsync -a --ignore-existing lnd-fuzz/ ./
|
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2024-03-14 11:14:39 +01:00
|
|
|
key-prefix: unit-test
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
- name: install bitcoind
|
2024-03-15 12:54:29 +01:00
|
|
|
run: ./scripts/install_bitcoind.sh $BITCOIN_VERSION
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
- name: run ${{ matrix.unit_type }}
|
2024-03-15 22:12:23 +08:00
|
|
|
run: make ${{ matrix.unit_type }}
|
2020-04-24 11:14:48 +02:00
|
|
|
|
|
|
|
- name: Send coverage
|
2024-12-11 15:39:23 +01:00
|
|
|
uses: ziggie1984/actions-goveralls@c440f43938a4032b627d2b03d61d4ae1a2ba2b5c
|
2020-04-24 11:14:48 +02:00
|
|
|
if: matrix.unit_type == 'btcd unit-cover'
|
2025-02-12 11:46:44 +02:00
|
|
|
continue-on-error: true
|
2020-04-24 11:14:48 +02:00
|
|
|
with:
|
|
|
|
path-to-profile: coverage.txt
|
2024-03-25 14:09:09 +01:00
|
|
|
flag-name: 'unit'
|
2020-04-24 11:14:48 +02:00
|
|
|
parallel: true
|
2020-12-15 21:17:11 +02:00
|
|
|
|
2023-09-04 19:17:53 +08:00
|
|
|
|
2021-10-01 11:51:29 +02:00
|
|
|
########################
|
2024-12-05 17:29:54 +08:00
|
|
|
# run integration tests with TRANCHES
|
2021-10-01 11:51:29 +02:00
|
|
|
########################
|
2024-12-05 17:29:54 +08:00
|
|
|
basic-integration-test:
|
|
|
|
name: basic itests
|
2021-10-01 11:51:29 +02:00
|
|
|
runs-on: ubuntu-latest
|
2023-02-06 12:25:27 +01:00
|
|
|
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')'
|
2021-10-01 11:51:29 +02:00
|
|
|
strategy:
|
|
|
|
# Allow other tests in the matrix to continue if one fails.
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-10-08 16:32:17 +02:00
|
|
|
include:
|
|
|
|
- name: btcd
|
2024-03-21 15:38:48 +01:00
|
|
|
args: backend=btcd cover=1
|
2021-10-08 16:32:17 +02:00
|
|
|
- name: bitcoind
|
2024-03-21 15:38:48 +01:00
|
|
|
args: backend=bitcoind cover=1
|
2021-10-08 16:32:17 +02:00
|
|
|
- name: bitcoind-notxindex
|
|
|
|
args: backend="bitcoind notxindex"
|
|
|
|
- name: neutrino
|
2024-03-21 15:38:48 +01:00
|
|
|
args: backend=neutrino cover=1
|
2021-10-01 11:51:29 +02:00
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2021-10-01 11:51:29 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2024-06-11 14:49:09 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: fetch and rebase on ${{ github.base_ref }}
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
uses: ./.github/actions/rebase
|
2021-10-01 11:51:29 +02:00
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2024-03-14 11:14:39 +01:00
|
|
|
key-prefix: integration-test
|
2021-10-01 11:51:29 +02:00
|
|
|
|
|
|
|
- name: install bitcoind
|
2024-03-15 12:54:29 +01:00
|
|
|
run: ./scripts/install_bitcoind.sh $BITCOIN_VERSION
|
2021-10-01 11:51:29 +02:00
|
|
|
|
2021-10-08 16:32:17 +02:00
|
|
|
- name: run ${{ matrix.name }}
|
2024-11-07 12:50:40 +08:00
|
|
|
run: make itest-parallel tranches=${{ env.TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }}
|
2023-01-26 11:35:43 +01:00
|
|
|
|
|
|
|
- name: Send coverage
|
2024-03-21 15:38:48 +01:00
|
|
|
if: ${{ contains(matrix.args, 'cover=1') }}
|
2025-02-12 11:46:44 +02:00
|
|
|
continue-on-error: true
|
2024-12-11 15:39:23 +01:00
|
|
|
uses: ziggie1984/actions-goveralls@c440f43938a4032b627d2b03d61d4ae1a2ba2b5c
|
2023-01-26 11:35:43 +01:00
|
|
|
with:
|
|
|
|
path-to-profile: coverage.txt
|
2024-03-25 14:09:09 +01:00
|
|
|
flag-name: 'itest-${{ matrix.name }}'
|
2023-01-26 11:35:43 +01:00
|
|
|
parallel: true
|
2021-10-01 11:51:29 +02:00
|
|
|
|
2021-10-08 16:32:17 +02:00
|
|
|
- name: Zip log files on failure
|
|
|
|
if: ${{ failure() }}
|
2022-11-14 15:55:08 +08:00
|
|
|
timeout-minutes: 5 # timeout after 5 minute
|
2024-11-15 01:41:22 -08:00
|
|
|
run: 7z a logs-itest-${{ matrix.name }}.zip itest/**/*.log itest/postgres.log
|
2021-10-08 16:32:17 +02:00
|
|
|
|
|
|
|
- name: Upload log files on failure
|
2025-01-10 08:31:57 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-10-06 14:11:39 +02:00
|
|
|
if: ${{ failure() }}
|
2021-10-01 11:51:29 +02:00
|
|
|
with:
|
2021-10-08 16:32:17 +02:00
|
|
|
name: logs-itest-${{ matrix.name }}
|
|
|
|
path: logs-itest-${{ matrix.name }}.zip
|
2021-10-01 11:51:29 +02:00
|
|
|
retention-days: 5
|
|
|
|
|
2024-12-05 17:29:54 +08:00
|
|
|
########################
|
|
|
|
# run integration tests with SMALL_TRANCHES
|
|
|
|
########################
|
|
|
|
integration-test:
|
|
|
|
name: 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: bitcoind-rpcpolling
|
|
|
|
args: backend="bitcoind rpcpolling"
|
|
|
|
- name: bitcoind-etcd
|
|
|
|
args: backend=bitcoind dbbackend=etcd
|
|
|
|
- name: bitcoind-sqlite
|
|
|
|
args: backend=bitcoind dbbackend=sqlite
|
|
|
|
- name: bitcoind-sqlite-nativesql
|
|
|
|
args: backend=bitcoind dbbackend=sqlite nativesql=true
|
|
|
|
- name: bitcoind-postgres
|
|
|
|
args: backend=bitcoind dbbackend=postgres
|
|
|
|
- name: bitcoind-postgres-nativesql
|
|
|
|
args: backend=bitcoind dbbackend=postgres nativesql=true
|
|
|
|
steps:
|
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2024-12-05 17:29:54 +08:00
|
|
|
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.SMALL_TRANCHES }} ${{ matrix.args }} shuffleseed=${{ github.run_id }}${{ strategy.job-index }}
|
|
|
|
|
|
|
|
- name: Send coverage
|
|
|
|
if: ${{ contains(matrix.args, 'cover=1') }}
|
2025-02-12 11:46:44 +02:00
|
|
|
continue-on-error: true
|
2025-02-13 22:05:38 +08:00
|
|
|
uses: ziggie1984/actions-goveralls@c440f43938a4032b627d2b03d61d4ae1a2ba2b5c
|
2024-12-05 17:29:54 +08:00
|
|
|
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
|
2025-01-10 08:31:57 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-12-05 17:29:54 +08:00
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
|
|
|
name: logs-itest-${{ matrix.name }}
|
|
|
|
path: logs-itest-${{ matrix.name }}.zip
|
|
|
|
retention-days: 5
|
|
|
|
|
2022-11-14 15:55:08 +08:00
|
|
|
|
2021-10-01 11:51:29 +02:00
|
|
|
########################
|
|
|
|
# run windows integration test
|
|
|
|
########################
|
|
|
|
windows-integration-test:
|
2024-12-05 17:29:54 +08:00
|
|
|
name: windows itest
|
2021-10-01 11:51:29 +02:00
|
|
|
runs-on: windows-latest
|
2023-02-06 12:25:27 +01:00
|
|
|
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')'
|
2021-10-01 11:51:29 +02:00
|
|
|
steps:
|
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2024-06-11 14:49:09 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: fetch and rebase on ${{ github.base_ref }}
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
uses: ./.github/actions/rebase
|
2021-10-01 11:51:29 +02:00
|
|
|
|
2023-01-06 08:58:41 +01:00
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
2022-12-15 16:23:13 +08:00
|
|
|
uses: ./.github/actions/setup-go
|
2023-01-06 08:58:41 +01:00
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
2024-03-14 11:14:39 +01:00
|
|
|
key-prefix: integration-test
|
2021-10-01 11:51:29 +02:00
|
|
|
|
|
|
|
- name: run itest
|
2024-12-05 17:29:54 +08:00
|
|
|
run: make itest-parallel tranches=${{ env.SMALL_TRANCHES }} windows=1 shuffleseed=${{ github.run_id }}
|
2023-10-10 14:15:41 +00:00
|
|
|
|
|
|
|
- name: kill any remaining lnd processes
|
|
|
|
if: ${{ failure() }}
|
|
|
|
shell: powershell
|
|
|
|
run: taskkill /IM lnd-itest.exe /T /F
|
2021-10-01 11:51:29 +02:00
|
|
|
|
2022-07-22 07:10:56 +08:00
|
|
|
- name: Zip log files on failure
|
|
|
|
if: ${{ failure() }}
|
2022-11-14 15:55:08 +08:00
|
|
|
timeout-minutes: 5 # timeout after 5 minute
|
2022-11-14 16:55:08 +08:00
|
|
|
run: 7z a logs-itest-windows.zip itest/**/*.log
|
2022-07-22 07:10:56 +08:00
|
|
|
|
|
|
|
- name: Upload log files on failure
|
2025-01-10 08:31:57 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-07-22 07:10:56 +08:00
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
|
|
|
name: logs-itest-windows
|
|
|
|
path: logs-itest-windows.zip
|
|
|
|
retention-days: 5
|
|
|
|
|
2024-03-18 11:56:35 +01:00
|
|
|
########################
|
|
|
|
# run macOS integration test
|
|
|
|
########################
|
|
|
|
macos-integration-test:
|
2024-12-05 17:29:54 +08:00
|
|
|
name: macOS itest
|
2024-03-18 11:56:35 +01:00
|
|
|
runs-on: macos-14
|
|
|
|
if: '!contains(github.event.pull_request.labels.*.name, ''no-itest'')'
|
|
|
|
steps:
|
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2024-06-11 14:49:09 -04:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: fetch and rebase on ${{ github.base_ref }}
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
uses: ./.github/actions/rebase
|
2024-03-18 11:56:35 +01:00
|
|
|
|
|
|
|
- name: setup go ${{ env.GO_VERSION }}
|
|
|
|
uses: ./.github/actions/setup-go
|
|
|
|
with:
|
|
|
|
go-version: '${{ env.GO_VERSION }}'
|
|
|
|
key-prefix: integration-test
|
|
|
|
|
|
|
|
- name: run itest
|
2024-12-05 17:29:54 +08:00
|
|
|
run: make itest-parallel tranches=${{ env.SMALL_TRANCHES }} shuffleseed=${{ github.run_id }}
|
2024-03-18 11:56:35 +01:00
|
|
|
|
|
|
|
- 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
|
2025-01-10 08:31:57 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2024-03-18 11:56:35 +01:00
|
|
|
if: ${{ failure() }}
|
|
|
|
with:
|
|
|
|
name: logs-itest-macos
|
|
|
|
path: logs-itest-macos.zip
|
|
|
|
retention-days: 5
|
2022-07-22 07:10:56 +08:00
|
|
|
|
2020-12-15 21:17:11 +02:00
|
|
|
########################
|
|
|
|
# check pinned dependencies
|
|
|
|
########################
|
|
|
|
dep-pin:
|
|
|
|
name: check pinned dependencies
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
# Allow other tests in the matrix to continue if one fails.
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
pinned_dep:
|
2024-04-02 08:39:17 +02:00
|
|
|
- google.golang.org/grpc v1.59.0
|
2023-10-26 10:25:35 +02:00
|
|
|
- github.com/golang/protobuf v1.5.3
|
2020-12-15 21:17:11 +02:00
|
|
|
|
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2020-12-15 21:17:11 +02:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2020-12-15 21:17:11 +02:00
|
|
|
|
2023-07-10 11:04:12 +02:00
|
|
|
- name: ensure dependencies at correct version
|
2021-10-01 11:51:29 +02:00
|
|
|
run: if ! grep -q "${{ matrix.pinned_dep }}" go.mod; then echo dependency ${{ matrix.pinned_dep }} should not be altered ; exit 1 ; fi
|
2021-07-14 16:54:09 -07:00
|
|
|
|
|
|
|
########################
|
|
|
|
# check PR updates release notes
|
|
|
|
########################
|
|
|
|
milestone-check:
|
|
|
|
name: check release notes updated
|
|
|
|
runs-on: ubuntu-latest
|
2023-02-06 12:25:27 +01:00
|
|
|
if: '!contains(github.event.pull_request.labels.*.name, ''no-changelog'')'
|
2021-07-14 16:54:09 -07:00
|
|
|
steps:
|
2024-12-20 14:00:30 +08:00
|
|
|
- name: cleanup space
|
|
|
|
run: rm -rf /opt/hostedtoolcache
|
|
|
|
|
2021-07-14 16:54:09 -07:00
|
|
|
- name: git checkout
|
2024-07-24 22:28:50 +08:00
|
|
|
uses: actions/checkout@v4
|
2021-07-14 16:54:09 -07:00
|
|
|
|
|
|
|
- name: release notes check
|
|
|
|
run: scripts/check-release-notes.sh
|
2024-03-21 15:38:48 +01:00
|
|
|
|
|
|
|
# Notify about the completion of all coverage collecting jobs.
|
|
|
|
finish:
|
|
|
|
if: ${{ always() }}
|
2024-12-05 17:29:54 +08:00
|
|
|
needs: [unit-test, basic-integration-test]
|
2024-03-21 15:38:48 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2025-02-13 22:05:38 +08:00
|
|
|
- name: Send coverage
|
|
|
|
uses: ziggie1984/actions-goveralls@c440f43938a4032b627d2b03d61d4ae1a2ba2b5c
|
|
|
|
continue-on-error: true
|
2024-03-21 15:38:48 +01:00
|
|
|
with:
|
|
|
|
parallel-finished: true
|