2021-08-26 18:06:44 +00:00
|
|
|
name: Lint
|
2021-06-08 07:07:11 +00:00
|
|
|
# Lint runs golangci-lint over the entire ethermint 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.
|
2020-06-26 22:26:55 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-06-08 07:07:11 +00:00
|
|
|
- main
|
2020-06-26 22:26:55 +00:00
|
|
|
jobs:
|
|
|
|
golangci:
|
2021-06-08 07:07:11 +00:00
|
|
|
name: Run golangci-lint
|
2020-06-26 22:26:55 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-07-23 19:38:47 +00:00
|
|
|
timeout-minutes: 10
|
2020-06-26 22:26:55 +00:00
|
|
|
steps:
|
2021-10-18 11:53:16 +00:00
|
|
|
- uses: actions/checkout@v2.3.5
|
2021-08-02 13:08:21 +00:00
|
|
|
- uses: technote-space/get-diff-action@v5
|
2020-06-26 22:26:55 +00:00
|
|
|
with:
|
|
|
|
SUFFIX_FILTER: |
|
|
|
|
.go
|
|
|
|
.mod
|
|
|
|
.sum
|
2021-06-08 07:07:11 +00:00
|
|
|
- uses: golangci/golangci-lint-action@v2.5.2
|
2020-06-26 22:26:55 +00:00
|
|
|
with:
|
|
|
|
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
2021-10-07 16:41:27 +00:00
|
|
|
version: v1.42.1
|
2020-06-26 22:26:55 +00:00
|
|
|
args: --timeout 10m
|
|
|
|
github-token: ${{ secrets.github_token }}
|
2021-06-08 07:07:11 +00:00
|
|
|
# Check only if there are differences in the source code
|
|
|
|
if: "env.GIT_DIFF"
|