Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Test against Go 1.20+ and modernize build. #59

Merged
merged 6 commits into from
Oct 2, 2023

Conversation

jholdstock
Copy link
Member

This mainly updates build tooling to more closely match how things are configured in other Decred repos:

  • Use go 1.21, latest GitHub Actions and linter
  • Use a config file for linter
  • Add some additional linters
  • Remove outdated cruft from run_tests.sh

As of go 1.16, "go build" and "go test" now exit with an error rather
than silently modifying go.mod or go.sum files. As a result, we don't
need to manually check for altered mod/sum files in the test script.
Improve portability of run_tests.sh by using the POSIX compliant shebang
for locating bash.
golangci-lint detects when it is running in CI and automatically
switches to the appropriate output format, it doesn't need to be done
manually.

steps:
- name: Set up Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f #v3.3.1
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #4.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed.

with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #v3.1.0
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed.

@davecgh davecgh changed the title Modernize build build: Test against Go 1.20+ and modernize build. Oct 2, 2023
@davecgh davecgh merged commit 709f64d into decred:master Oct 2, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants