Commit Graph

47 Commits

Author SHA1 Message Date
Dave Collins
fedbaf982b
build: Test against Go 1.22.
This updates CI to test against Go 1.22 and removes the tests for Go
1.20 accordingly.
2024-02-09 13:39:47 -06:00
Dave Collins
db71f88b36
build: Update golangci-lint to v1.56.0. 2024-02-09 13:39:43 -06:00
Dave Collins
627e64f4af
build: Update golangci-lint to v1.55.2. 2024-01-10 09:19:24 -06:00
Dave Collins
f4398374aa
build: Update to latest action versions.
This updates to the following Github Actions:

- actions/checkout@b4ffde65f4 #v4.1.1
- actions/setup-go@0c52d547c9 #v5.0.0
- actions/cache@704facf57e # v3.3.2
2024-01-10 09:17:35 -06:00
Dave Collins
d5819dfedf
build: Test against Go 1.21.
This updates CI to test against Go 1.21 and removes the tests for Go
1.19 accordingly.
2023-08-18 12:33:04 -05:00
Dave Collins
cb4755d43b
build: Update golangci-lint to v1.53.1. 2023-08-18 12:32:37 -05:00
Dave Collins
023c2605e9
build: Update to latest action versions.
This updates to the following Github Actions:

- actions/setup-go@93397bea11 # v4.1.0
2023-08-18 12:31:25 -05:00
Dave Collins
9be168df96
build: Use setup-go action cache.
The latest version of the setup-go action now caches the go module and
build cache by default, so it should no longer be done separately to
avoid saving the same data under two different cache keys.

This updates the caching logic accordingly to remove those directories
from the separate cache step and renames the step to reflect that it now
only involves the lint cache.

Finally, while here, it also switches the key over to use the hash of
the 'go.sum' file in the root of the repository as opposed to using the
commit hash as it produces significantly less cache objects.
2023-08-02 19:54:52 -05:00
Dave Collins
11ff764754
build: Checkout source before Go setup.
This reverses the order of the checkout and setup actions so the setup
of Go itself is able to use the go.sum as a dependency as the newer
version expects.
2023-07-26 10:56:44 -05:00
Dave Collins
ea8c7b4e9f
build: Update golangci-lint to v1.53.3. 2023-07-24 12:35:35 -05:00
Dave Collins
304568bd04
build: Use go install for linter and add cache.
This modifies the GitHub Action workflow to install golangci-lint from
source with go install instead of using the separate install script and
adds ~/.cache/golangci-lint to the saved cache for faster future runs.

The goal is to pin the dependency for the same reason the GitHub actions
are pinned by hash.  Namely, it reduces potential security risks such as
compromised dependencies and dependency substitution attacks.

Using go install serves to pin the dependency because go verifies the
downloaded module contents against the original checksum hashes they
were first created with.
2023-07-24 12:33:07 -05:00
Dave Collins
6d8707a4ba
build: Move lint logic to its own script.
This separates the logic in run_tests.sh that runs all of the linters on
all modules in the repository to a separate lint.sh script and updates
run_tests.sh to call that script instead.  Rather than listing every
linter in the script comments, it refers to the .golangci.yml
configuration file that specifies them now that it exists.

This allows developers to more easily selectively run only the linters
without needing to run all of the tests again.

It also cleans up the comments in run_test.sh to match reality while
here.
2023-07-24 12:24:38 -05:00
Dave Collins
a2a984809e
build: Update to latest action versions.
This updates to the following Github Actions:

- actions/setup-go@fac708d667 #v4.0.1
- actions/checkout@c85c95e3d7 #v3.5.3
2023-07-24 12:22:09 -05:00
Dave Collins
3dc80cf238
build: Add CI support for test and module cache.
This makes use of the github actions cache to save and restore the Go
test and module caches.  This should result in faster CI runs since most
changes only affect a small number of tests.

It also updates the RPC integration tests to ensure the logs directory
is not in the source code dir so the go testing cache can be used.

Next, it renames the txscript module's data dir to testdata so go does
not treat it like a package.

Finally, it adds a script that stabilizes the timestamps on all files in
testdata directories when running the github action.  This is necessary
because the go testing cache logic uses the timestamps of all input
files when determining whether or not a test needs to be rerun and
github clones a fresh repo on every run which causes the timestamps of
the test data to change.
2023-06-19 14:18:30 -05:00
David Hill
ab6d284362 build: golangci-lint v1.53.1 2023-06-02 13:29:03 -05:00
David Hill
4c70396e67 build: move golangci flags to its own config file. 2023-03-28 12:38:10 -05:00
Dave Collins
17dcde8008
build: Test against Go 1.20.
This updates CI to test against Go 1.20 and removes the tests for Go
1.18 accordingly.
2023-02-12 10:59:00 -06:00
Dave Collins
1d30c9f49f
build: Update golangci-lint to v1.51.1. 2023-02-12 10:56:23 -06:00
Dave Collins
d271006606
build: Update to latest action versions.
This updates to the following Github Actions:

- actions/setup-go@6edd4406fa #v3.5.0
- actions/checkout@ac59398561 #v3.3.0
2023-02-12 10:51:58 -06:00
David Hill
64d0d55b34 build: Update to golangci-lint v1.50.0
replace deprecated 'deadcode' with 'unused'
2022-10-15 19:38:47 -05:00
Dave Collins
1e1c455423
build: Test against Go 1.19.
This updates CI to test against Go 1.19 and removes the tests for Go
1.17 accordingly.
2022-08-07 15:19:27 -05:00
Dave Collins
1a5d550961
build: Update golangci-lint to v1.48.0. 2022-08-07 15:19:27 -05:00
Dave Collins
76f713ab0e
build: Update to latest action versions.
This updates to the following Github Actions:

- actions/setup-go@84cbf80943 #v3.2.1
- actions/checkout@2541b1294d #v3.0.2
2022-08-07 15:19:26 -05:00
Dave Collins
bf162712d9
multi: Ensure newline at end of file. 2022-05-09 19:38:24 -05:00
matthawkins90
0326321685 multi: Update Go versions in README.md and .github/workflows/go.yml
With the release of Go 1.18, the supported versions listed in the
README and used in the go.yml workflow should be 1.17 and 1.18.

Also update the golangci-lint to v1.45.2
2022-03-25 07:18:28 -05:00
Dave Collins
a0f9723016
build: Update to latest action versions.
This updates to the following Github Actions:

- actions/setup-go@f6164bd8c8 #v3.0.0
- actions/checkout@a12a3943b4 #v3.0.0
2022-03-17 19:34:58 -05:00
jholdstock
338e4150ed build: Use recommended golangci-lint installer.
The CI pipeline was previously downloading golangci-lint using the tool
goreleaser/godownloader which is now deprecated. This PR changes the GitHub
actions config file to use the latest recommended installation method.
2022-03-16 11:40:00 -05:00
David Hill
2d0f608324
build: Replace deprecated terminal dep. 2022-03-10 11:17:56 -06:00
arjundashrath
3f1fedd1dd
build: Set token permissions for go.yml. 2022-03-08 15:06:06 -06:00
David Hill
3685e5be98 build: update golangci-lint to v1.44.1 2022-02-18 12:48:40 -06:00
Naveen
e22b4e4b4d
build: Pin GitHub Actions to SHA.
* The actions tags can be moved. So pinned the actions based on SHA.
 https://julienrenaux.fr/2019/12/20/github-actions-security-risk/
2021-09-17 11:26:59 -05:00
jholdstock
067a6b5d5b build: Don't set GO111MODULE unnecessarily.
As of go 1.16, the GO111MODULE environment variable defaults to "on",
so it doesn't need to be set explicitly when building or testing.
2021-09-01 06:09:37 -05:00
David Hill
48627ee18c
build: Test against Go 1.17. 2021-08-19 10:46:02 -05:00
David Hill
62b7ed1b6b
build: Test against go 1.16. 2021-02-18 12:55:12 -06:00
David Hill
d1e657f71c multi: sprinkle on more errors.As/Is 2020-12-24 13:46:38 -06:00
David Hill
88c0699096 build: test against go 1.15
Update golangci-linter to 1.30.0
2020-08-17 16:44:57 -05:00
David Hill
66807231ce build: golangci-lint v1.28.3 2020-07-21 12:33:51 -05:00
David Hill
2caadbde3f build: use golangci-lint v1.27.0 2020-05-26 21:43:10 -05:00
David Hill
d86202be39 build: use newer github and linter versions 2020-05-01 22:56:35 -05:00
David Hill
be680db523 multi: remove superfluous fmt.Sprintf
build: bump golangci-lint to 1.24.0
2020-03-27 16:05:30 -05:00
David Hill
4ec8d5c2bc build: test against go 1.14 2020-02-18 19:37:06 -06:00
David Hill
aeb0e87453 build: use golangci v1.23.6 2020-02-12 14:24:27 -06:00
David Hill
54b67d3474 build: golangci-lint v1.22.2 2020-01-03 18:00:02 -06:00
David Hill
00f21aba43 build: update golangci-lint to v1.21.0 2019-10-17 15:42:53 -05:00
Dave Collins
3e2208f8c1
build: Replace TravisCI with CI via Github actions. 2019-09-20 19:59:04 -05:00
Dave Collins
4fcf24f02c
build: Setup github actions for CI. 2019-09-20 12:40:49 -05:00
Dave Collins
979d21f6f3
docs: Add github pull request template.
This adds a pull request template which provides a checklist and links
to the code contribution guidelines to help contributors ensure they are
adhering to project standards.
2018-10-01 11:32:16 -05:00