-
Notifications
You must be signed in to change notification settings - Fork 69
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
ci(github): adds go actions #25
Conversation
.github/workflows/go.yml
Outdated
name: Test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure testing twice is required, it doubles the time it take. Why do we need to test in multiple architectures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we not see if it runs in atleast 2 of the most important archs?
.github/workflows/go.yml
Outdated
cache: true | ||
go-version-file: go.mod | ||
- name: Build | ||
run: make build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make file not in PR
.github/workflows/go.yml
Outdated
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets use latest version of these actions, ie:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
.github/workflows/go.yml
Outdated
go get -v -t -d ./... | ||
- name: Build | ||
run: go build -v ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of building all binaries? It doesn't seem like the build artefacts are cached? golangci-lint already detects is code doesn't compile.
.github/workflows/go.yml
Outdated
with: | ||
skip-cache: false | ||
version: v1.55.2 | ||
args: --config=.golangci.yml --out-${NO_FUTURE}format colored-line-number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest:
# Verbose with color. Just fail, don't fix issues. Use both annotations and normal output.
args: -v --color=always --fix=false --out-format=colored-line-number,github-actions
No need to specify --config=.golangci.yml
as that is the defailt
What is the purpose of NO_FUTURE
?
This PR adds the github standard "Contributor Covenant Code of Conduct". task: none
Adds a simple `Makefile` to the root that install the linter (`pre-commit`) and does linting. To see available make commands, run `make help`. task: none
Adds two github actions: - `golangci-lint`: Runs the go linter so issues are added inline to PR. - `pre-commit`: Runs pre-commit hooks (excluding golangci-lint) task: none
Adds the basic xtypes. Note these are Golang optimised types. They do not represent the solidity types, nor how these types are serialised exactly, since solidity is data sensitive and should remove all duplication. These types are slightly denormalised, containing `XMsgID` which contain `XStreamID` which is a slight duplication since `SourceChainID` can usually be inferred from the context. This is included for convenience and for explicitness. task: https://app.asana.com/0/1206208509925075/1206208573439595
Implement basic app cmd pattern with re-useable code in `lib/cmd`. task: none
Adds goreleaser config and building halo binary and docker images. Also adds simple release action that pushes the latest docker image to dockerhub. task: none
A previous PR took care of lint which does most of the stuff. |
Add go actions like build, format, lint and gosec to the workflows.
task: none