github.com/cosmos/cosmos-sdk@v0.50.10/.github/workflows/lint.yml (about) 1 name: Lint 2 on: 3 push: 4 branches: 5 - main 6 - release/** 7 pull_request: 8 merge_group: 9 permissions: 10 contents: read 11 jobs: 12 golangci: 13 name: golangci-lint 14 runs-on: ubuntu-latest 15 steps: 16 - uses: actions/checkout@v3 17 - uses: actions/setup-go@v4 18 with: 19 go-version: "1.21" 20 check-latest: true 21 - uses: technote-space/get-diff-action@v6.1.2 22 id: git_diff 23 with: 24 PATTERNS: | 25 Makefile 26 **/Makefile 27 .golangci.yml 28 - name: run linting (long) 29 if: env.GIT_DIFF 30 id: lint_long 31 run: | 32 make lint 33 - uses: technote-space/get-diff-action@v6.1.2 34 if: steps.lint_long.outcome == 'skipped' 35 id: git_diff_all 36 with: 37 PATTERNS: | 38 **/*.go 39 go.mod 40 go.sum 41 **/go.mod 42 **/go.sum 43 - name: run linting (short) 44 if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF 45 run: | 46 make lint 47 env: 48 GIT_DIFF: ${{ env.GIT_DIFF }} 49 LINT_DIFF: 1