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.
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.
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.
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.
We run into an issue with the linter that couldn't be fixed yet:
level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: buildir: failed to load package loopdb: could not load export data: no export data for \"github.com/lightninglabs/loop/loopdb\"\n\n"
We disable the linter for now until we find out what the problem is.
To make sure the compiled protos in the git repository are always up to
date, we add a GitHub action that checks them by compiling and diffing
the files.