Skip to content

Commit

Permalink
add lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-zq committed Jul 2, 2024
1 parent d636396 commit 326ef3f
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 39 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Lint
on:
push:
branches:
- main
- release/**
pull_request:
merge_group:
permissions:
contents: read
jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: actions/setup-go@v3
with:
go-version: "1.19"
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
Makefile
**/Makefile
.golangci.yml
- name: run linting (long)
if: env.GIT_DIFF
id: lint_long
run: |
nix develop -c make lint
env:
NIX: 1
- uses: technote-space/[email protected]
if: steps.lint_long.outcome == 'skipped'
with:
PATTERNS: |
**/*.go
*.go
- name: run linting (short)
if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF
run: |
nix develop -c make lint
env:
GIT_DIFF: ${{ env.GIT_DIFF }}
LINT_DIFF: 1
NIX: 1
37 changes: 0 additions & 37 deletions .github/workflows/sims.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion modules/htlc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
cosmossdk.io/core v0.5.1
cosmossdk.io/depinject v1.0.0-alpha.4
cosmossdk.io/errors v1.0.1
cosmossdk.io/math v1.2.0
github.com/cometbft/cometbft v0.37.4
github.com/cosmos/cosmos-proto v1.0.0-beta.4
github.com/cosmos/cosmos-sdk v0.47.9
Expand All @@ -32,7 +33,6 @@ require (
cloud.google.com/go/iam v1.1.5 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/log v1.3.1 // indirect
cosmossdk.io/math v1.2.0 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
Expand Down
2 changes: 1 addition & 1 deletion simapp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.19

require (
cosmossdk.io/depinject v1.0.0-alpha.4
cosmossdk.io/errors v1.0.1
cosmossdk.io/math v1.2.0
github.com/cometbft/cometbft v0.37.4
github.com/cometbft/cometbft-db v0.7.0
Expand All @@ -21,7 +22,6 @@ require (
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/api v0.3.1 // indirect
cosmossdk.io/core v0.5.1 // indirect
cosmossdk.io/errors v1.0.1 // indirect
cosmossdk.io/log v1.3.1 // indirect
cosmossdk.io/tools/rosetta v0.2.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
Expand Down

0 comments on commit 326ef3f

Please sign in to comment.