-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix lint action and lint errors * remove unnecessary goprivate from workflow
- Loading branch information
Showing
10 changed files
with
87 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,15 +24,18 @@ jobs: | |
golangci: | ||
env: | ||
# for private repo access | ||
GOPRIVATE: github.com/initia-labs/* | ||
GOPRIVATE: github.com/initia-labs | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} | ||
GOLANGCI_LINT_VERSION: v1.59.1 | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- uses: technote-space/get-diff-action@v5 | ||
check-latest: true | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
|
@@ -41,26 +44,43 @@ jobs: | |
go.sum | ||
# for private repo access | ||
- run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:[email protected]/.insteadOf https://github.com/ | ||
- name: run go linters | ||
# install golangci-lint | ||
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} | ||
- name: run go linters (long) | ||
if: env.GIT_DIFF | ||
id: lint_long | ||
run: | | ||
make tools | ||
make lint | ||
if: env.GIT_DIFF | ||
- uses: technote-space/[email protected] | ||
if: steps.lint_long.outcome == 'skipped' | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- name: run go linters (short) | ||
if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF | ||
run: | | ||
make lint | ||
env: | ||
GIT_DIFF: ${{ env.GIT_DIFF }} | ||
LINT_DIFF: 1 | ||
# Use --check or --exit-code when available (Go 1.19?) | ||
# https://github.com/golang/go/issues/27005 | ||
tidy: | ||
env: | ||
# for private repo access | ||
GOPRIVATE: github.com/initia-labs/* | ||
GOPRIVATE: github.com/initia-labs,github.com/skip-mev/slinky | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GH_READ_TOKEN }} | ||
runs-on: ubuntu-latest | ||
name: tidy | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Setup go | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
check-latest: true | ||
# for private repo access | ||
- run: git config --global url.https://${GITHUB_ACCESS_TOKEN}:[email protected]/.insteadOf https://github.com/ | ||
- 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
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
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
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
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
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
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
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
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