perf: use actions setup-go #236
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint_and_test | |
on: | |
push: | |
jobs: | |
golangci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: ./go.mod | |
cache-dependency-path: | | |
go.sum | |
- uses: jdx/mise-action@v2 | |
- name: go mod tidy | |
run: go mod tidy | |
- name: make install go tools | |
run: make install-go-tools | |
- name: pre-commit install | |
run: pre-commit install | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.61.0 | |
- name: build | |
run: | | |
export PATH=$(go env GOROOT)/bin:$PATH | |
make build | |
- name: testing | |
run: make test |