diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8c4291f86b..baba4e3a4e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 6 steps: + - uses: actions/checkout@v3 - uses: actions/setup-go@v3.5.0 with: go-version: 1.18 - - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6.1.2 id: git_diff with: @@ -23,6 +23,19 @@ jobs: **/**.go go.mod go.sum + - name: Clear cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + run-id: ${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-go- + - name: check pwd + run: | + ls -al - uses: golangci/golangci-lint-action@master with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 522cbf4b4f..e7d529f393 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,11 +19,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3.5.0 + - uses: actions/setup-go@v4 with: go-version: 1.18 - name: Display go version - run: go version + run: go version - name: Check if difference uses: technote-space/get-diff-action@v6.1.2 id: git_diff @@ -33,6 +33,16 @@ jobs: go.mod go.sum .github/workflows/test.yml + - name: Clear cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + run-id: ${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-go- - name: Build run: make build if: env.GIT_DIFF @@ -64,6 +74,16 @@ jobs: go.mod go.sum .github/workflows/test.yml + - name: Clear cache + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + run-id: ${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-go- - name: Benchmarks for gas calculations run: | cd ./x/wasm/keeper diff --git a/.golangci.yml b/.golangci.yml index 17d5384ea3..54497acc41 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,7 +5,6 @@ linters: disable-all: true enable: - bodyclose - - deadcode - depguard - dogsled - errcheck @@ -23,12 +22,10 @@ linters: - prealloc - exportloopref - staticcheck - - structcheck - stylecheck - typecheck - unconvert - unused - - varcheck issues: exclude-rules: diff --git a/go.sum b/go.sum index 558ad70eab..c23e40845f 100644 --- a/go.sum +++ b/go.sum @@ -421,7 +421,7 @@ github.com/line/lbm-sdk v0.46.1-0.20230209105703-b88647308597 h1:J0Pr378D5JmHNji github.com/line/lbm-sdk v0.46.1-0.20230209105703-b88647308597/go.mod h1:Od+QeMi4JO4HB3HEdPTqzI7mAvn1w99PZ9pmKmtNDco= github.com/line/ostracon v1.0.9-0.20230209043112-5aca894db3a6 h1:nuM0PTB04PCax35+u8LRpTufdmwoPZcBhhKjqbezMYA= github.com/line/ostracon v1.0.9-0.20230209043112-5aca894db3a6/go.mod h1:iLRth/ryufyNePzJ1ULJ4S8SYGUD/lF+aIFUTRKY9tQ= -github.com/line/wasmvm v1.1.1-0.11.1 h1:W3fuNZyQYm+fyXV4n6Ds8pzmHLyYcgv5gXgQf42ofi8= +github.com/line/wasmvm v1.1.1-0.11.1 h1:KA08sjeaIp0nudXOklUPWHSjNGNRogYYyKJHVlny20Y= github.com/line/wasmvm v1.1.1-0.11.1/go.mod h1:Lq3FVvi/rb+OOlTxqtcqcao2GGESQ4hUpuXMcjdJbco= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=