Commit graph

82 commits

Author SHA1 Message Date
jamaljsr
a04ecb750d
ci: run node 24
The frontend job was pinned to node 16, which is old enough that some of
the packages patched in this branch refuse to install there. tar and
esbuild want node 18 or newer, serialize-javascript wants 20.

Node was also only pinned in the frontend job. The backend,
proto-compile-check and itest jobs all reference matrix.node_version
without declaring it in their matrix, so the expression resolved to an
empty string and setup-node fell back to whatever the runner happened to
ship. Two of those run `yarn install --frozen-lockfile`, so they need a
known version too.

Both are fixed by a NODE_VERSION env var, matching how GO_VERSION is
already handled. It replaces the matrix entry rather than feeding it,
because the env context isn't available inside strategy.matrix.
2026-08-11 10:12:44 -05:00
Viktor Torstensson
e093948a35
Merge pull request #1306 from erickcestari/harden-ci-workflow
ci: harden main.yml workflow against supply-chain risks
2026-07-27 11:59:27 +02:00
ziggie
41a6c8b3f7
build: bump go to v1.25.11 2026-07-10 19:24:26 -03:00
Viktor Torstensson
4e72e798e6
docker: improve cleanup of docker space in CI
Mimic `lnd`s cleanup of docker space in CI by adding a new clean-space
job which removes the same docker related artifacts as `lnd` does prior
to running the rest of the docker.yml jobs.
2026-07-01 12:58:42 +02:00
Calvin Zachman
862c1dba9d
multi: bump lnd, lndclient, and taproot-assets dependencies
Bumps lnd to v0.21.0-beta, lndclient to v0.21.0-1, and
taproot-assets to v0.8.0 across the root, litrpc, and perms
modules. taprpc uses the proper v1.1.0 tag.

lnd removed the deprecated SendPaymentSync, SendToRouteSync,
SendPayment (streaming), and SendToRoute (streaming) RPCs. The
account interceptor checkers and their tests for these RPCs are
removed since no client can call them anymore. The V2 checkers
already handle account tracking for payments.

The itest harness is updated for lnd v0.21's miner API changes
(SendOutputs -> SendOutput, Miner.Client.Generate -> GenerateBlocks,
waitForNTxsInMempool replaced by Miner.AssertNumTxsInMempool) and
TimeLockDelta bumped from 20 to 40 since lnd v0.21 raised
MinCLTVDelta from 18 to 24.
2026-06-08 13:18:37 -04:00
Erick Cestari
409cba4f63
ci: harden main.yml workflow against supply-chain risks
Apply least-privilege and standard hardening to the CI workflow:

- Set top-level `permissions: contents: read` so `GITHUB_TOKEN` no
  longer defaults to broad read/write across the repo.
- Pass `github.base_ref` and `github.repository` via env vars in the
  `check-commits` job to prevent shell injection via expression
  interpolation in `run:` blocks.
- Pin third-party `jpribyl/action-docker-layer-caching` to a full
  commit SHA so a tag retag cannot swap in unreviewed code.
- Bump `actions/checkout@v3` to `@v4` in `sqlc-check` for consistency
  with the rest of the workflow.
- Use `yarn install --frozen-lockfile` for all dependency installs so
  CI fails on lockfile drift instead of silently resolving new
  package versions.
2026-05-13 11:25:41 -03:00
Dario Anongba Varela
5960b65cfa
itest: remove custom channels tests and backward compat infrastructure
Custom channels integration tests have been fully migrated to the
taproot-assets repository where they run natively via the tapd-integrated
binary without any lightning-terminal dependency. This removes the
duplicate test suite and all supporting infrastructure from LiT.

The LiT-specific itests are unaffected.
2026-03-16 15:37:49 +01:00
ZZiigguurraatt
91b43118c7 build: bump go to v1.25.5 2026-03-03 14:25:35 -05:00
ZZiigguurraatt
432a228bd6 build: bump go to v1.24.11 2026-02-05 02:57:05 -05:00
Viktor Torstensson
9f85c425d6
workflows/claude: fix PR checkout for fork PRs
When a PR originates from a fork, the PR branch doesn't exist in the
origin remote. This adds a step that uses `gh pr checkout` before
running the Claude action, which properly handles fork PRs by adding
the fork as a remote and fetching the branch from there.
2026-02-03 13:08:40 +01:00
Elle
8ab792856f
Merge pull request #1214 from lightninglabs/removeClaudeReview
.github: remove claude review workflow
2026-01-29 10:57:45 +02:00
Elle
acbb395ddd
Merge pull request #1210 from ViktorT-11/2025-01-fix-logs-upload-bug
github: ensure logs are uploaded correctly on error
2026-01-29 10:31:19 +02:00
Elle Mouton
668fe4efb8
.github: remove claude review workflow
From other repos, we have seen that it can get quite spammy. So removing
for now. Users can instead comment `@claude review this` once the PR is
ready for review.
2026-01-29 10:26:54 +02:00
Jared Tobin
ecc0d81b4f
Merge pull request #1203 from jtobin/lit-cache
ci: wire up 'key-prefix' for caching
2026-01-28 22:49:44 +04:00
Elle
4e58738710 "Claude Code Review workflow" 2026-01-28 11:43:38 +02:00
Elle
07a04e7701 "Claude PR Assistant workflow" 2026-01-28 11:43:36 +02:00
Viktor Torstensson
bf24dd53b3
github: ensure logs are uploaded correctly on error
Prior to this commit, logs were not correctly uploaded on failure as the
logs were being written under itest/.logs, but the workflow zipped only
itest/ **/*.log. Because .logs is a hidden directory, the glob doesn’t
match it, so 7z creates an empty archive.

We also move the logs to a non-hidden directory when being uploaded to
avoid that the logs are downloaded as a hidden directory.
2026-01-26 18:59:55 +01:00
Jared Tobin
c64b47eec6
ci: add a 'build-itest' job to main workflow
Adds a separate 'build-itest' job that builds the itest binaries prior
to the actual itest jobs being kicked off. With this change we'll
rebuild the itest binaries at most once, instead of at most four times.
2026-01-23 10:06:11 +04:00
Jared Tobin
5b9d357e1f
ci: wire up 'key-prefix' for caching
The setup-go@v5 action caches GOMODCACHE and GOCACHE by default when
there's a go.sum file present. The cache is immutable, and keys have the
form:

  setup-go-{os}-{arch}-{os-version}-go-{version}-{hash}

where 'hash' comes from go.sum. These keys don't take build tags into
account, and whichever job finishes first writes to the cache.

Consider the 'main' workflow, in which a bunch of jobs are kicked off to
run concurrently. A job like 'lint', which runs quickly, gets privileges
to write to the cache, but an issue is that its artifacts are built with
different tags than are e.g. the itest jobs. Thus, when an itest job
later gets a cache hit, the cached entry doesn't actually contain the Go
archive files that the itest needs.

The changes introduced in this commit use the existing 'key-prefix'
argument to avoid this problem. Setting 'key-prefix' bypasses the
default setup-go cache, using a separate cache with keys that depend
on the supplied prefix.

The full keys in this case are:

  {key_prefix}-go-{os}-{arch}-{go-version}-{hash}

For the itest jobs, key-prefix is simply set to 'itest', so itest
artifacts will be cached with keys prefixed by 'itest' that won't be
preempted with irrelevant entries from faster-running jobs like 'lint'.
2026-01-23 08:03:52 +04:00
ffranr
07b59f069d
ci: run itest tranches in parallel
- switch itest matrix jobs to use itest-parallel(-no-backward-compat)
- run four tranches per job
2025-12-09 12:47:05 +00:00
ZZiigguurraatt
ba840892bb build: bump go to v1.24.9 2025-10-24 16:48:53 -04:00
George Tsagkarelis
69ca6587b7
build: bump go to v1.24.6 2025-09-18 12:05:28 +02:00
Elle Mouton
eb1d081314
build: bump go version to 1.23.12 2025-08-07 11:10:39 +02:00
Oliver Gugger
b4e4d438e0
GitHub: make Docker build more reliable
Currently the Docker image build regularly fails with "no space left on
disk". We try to delete additional files and docker images to try to
avoid that error.
2025-06-19 15:02:34 +02:00
Oliver Gugger
503a295252
multi: bump Golang to 1.23.9
Fixes several CVEs by using the latest Golang version to build.
2025-05-21 19:25:30 +02:00
Oliver Gugger
03c80cfeab
multi: add backward compatibility test 2025-05-16 18:52:03 +02:00
Oliver Gugger
9fe92d7d10
GitHub: target different integration tests 2025-05-07 15:02:31 +02:00
Oliver Gugger
0a22bc7e03
GitHub: remove caching, already built in
The actions/setup-go@v5 already includes Go module caching by default.
We no longer need to add our custom caching.
2025-05-02 11:05:13 +02:00
Elle Mouton
095ecafd67
.github: correctly name log zip file to be namespaced 2025-03-25 18:02:04 +02:00
Elle Mouton
6dbb68b4e5
.github: namespace itests
Since we have multiple itest artefacts with the same name now, we need
to ensure they have different names or else the upload will fail.
2025-03-15 11:39:41 -05:00
Elle Mouton
6c82db3fb3
multi: go version bump to 1.23.6
We update the go version in our go.mod, for our linter,
GH workflows and makefile.
2025-03-15 11:37:15 -05:00
Elle Mouton
5eba328161
.github: run itests against all types of account stores
In this commit, we ensure that our CI runs our itests against all
available DB backends. Currently, this will only affect the accounts
store.
2025-02-21 11:18:36 -03:00
Elle Mouton
0ec5d949f0
make+GH: helpers for testing against new SQL stores 2025-02-21 10:35:06 -03:00
Oliver Gugger
24fb56c115
GitHub: build nightly docker image from master
With the experimental branch now merged into master, we can remove the
TODO and actually build the nightly images from master.
2025-02-04 11:58:26 +01:00
Elle Mouton
536b41156c
.github: add CI step to run the sqlc check 2025-01-29 16:37:20 +02:00
Oliver Gugger
415e589c63
GitHub: cancel jobs for previous pushes of PR
This takes over two more settings we have in the lnd repo. The first is
to cancel existing CI runs for the same PR if it is pushed again before
the previous run has completed.

The second is just for consistency, to make sure all shells are bash
shells.
2025-01-23 10:15:43 +01:00
Oliver Gugger
2f72da0490
GitHub: fix permission denied in lint CI step
This attempts to fix the following error that sometimes occurs on the
GitHub runners:

 go: github.com/lightninglabs/lightning-terminal imports
	github.com/lightningnetwork/lnd/kvdb imports
	github.com/lightningnetwork/lnd/kvdb/etcd imports
	go.etcd.io/etcd/server/v3/embed: mkdir /home/runner/go/pkg/mod/cache/download/go.etcd.io/etcd/server: permission denied

The suspicion is that the lint step that runs as root within docker
changes the permissions of some of the module cache directories.
So by simply changing the order of operations, this should be fixed.
2025-01-23 10:10:56 +01:00
Oliver Gugger
4a3a628b83
GitHub: add Golang cross compilation check 2025-01-23 09:26:40 +01:00
Oliver Gugger
474080fa31
GitHub: update actions/checkout to v4 2025-01-23 09:18:05 +01:00
Elle Mouton
d40e027df4
.github: bump upload-artifact action to v4 2025-01-10 08:47:14 +02:00
Elle Mouton
69aee75377
.github: use matrix for unit tests
Later on we will want to run the unit tests against different backends.
When that is the case, we can just add a new unit_type to this matrix
instead of needing to repeat all the same set-up steps.
2025-01-07 12:34:56 +02:00
Oliver Gugger
f50fb91ed6
GitHub: upload logs on failure 2024-11-07 09:41:17 +01:00
Oliver Gugger
65144f2c97
GitHub+docker: update to Go 1.22.6 2024-10-23 11:50:41 +02:00
Oliver Gugger
81daa30ac8
.github: clear build cache between image builds
To fix the issue that currently prevents the second image (with the /lit
path prefix) to be built and pushed (both for releases and nightly
builds), we clear the build cache between builds.
2024-08-21 18:15:28 +02:00
Name
2c6075328f
GitHub: add nightly schedule to Docker CD workflow
Added a daily schedule to the Docker workflow to automate builds and
pushes of the `daily-testing` image. This change introduces a new cron
job that runs every day at midnight (UTC) and triggers the workflow.
2024-08-14 09:59:45 +02:00
Oliver Gugger
85a89b52b7
GitHub: split git tag and image tag
This commit allows us to have different values for the git tag that is
checked out (RELEASE_VERSION) and the image tag that we push
(IMAGE_TAG).
2024-08-14 09:21:12 +02:00
Oliver Gugger
cf9aaf32c0
GitHub: rename env variables
This commit renames the environment variables to be more accurate and
less confusing.
2024-08-14 09:19:52 +02:00
Elle Mouton
3f4b4f378e
scripts+.github: add release notes updated check 2024-06-11 11:24:59 -04:00
Viktor Tigerström
6d2e90a835
GitHub+Dockerfile: bump Go version to v1.22.3 2024-06-06 13:45:18 -04:00
Oliver Gugger
bca54ef83d
GitHub: re-enable the linter
The linter was disabled before due to a bug. Since the bug was likely
caused by an issue with a go module in a dependency project which was
updated in the meantime, we attempt to re-enable the linter in the CI
now.
2024-01-03 11:14:51 +01:00