-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: make makefile and ci match (#13208)
- Loading branch information
Showing
5 changed files
with
15 additions
and
512 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 |
---|---|---|
@@ -1,43 +1,27 @@ | ||
name: Lint | ||
# Lint runs golangci-lint over the entire cosmos-sdk repository | ||
# This workflow is run on every pull request and push to main | ||
# The `golangci` will pass without running if no *.{go, mod, sum} files have been changed. | ||
on: | ||
pull_request: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
permissions: | ||
contents: read | ||
|
||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
jobs: | ||
golangci: | ||
permissions: | ||
pull-requests: read # for technote-space/get-diff-action to get git reference | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18 | ||
# ci is set to go1.19 to match developer setups | ||
go-version: 1.19 | ||
- uses: actions/checkout@v3 | ||
- uses: technote-space/get-diff-action@v6.1.0 | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- name: Get data from Go build cache | ||
# if: env.GIT_DIFF | ||
if: ${{ false }} | ||
uses: actions/cache@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/golangci-lint | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | ||
- name: Run golangci-lint | ||
if: env.GIT_DIFF | ||
run: make lint | ||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | ||
version: latest |
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
Oops, something went wrong.