Skip to content

Commit

Permalink
build(deps): Update outdated deps/ghactions - v0.3.1 (#125)
Browse files Browse the repository at this point in the history
* Bump Go from 1.20 to 1.22

* Update go deps

* Update ghactions

* revert 38f61c

* Bump Ostracon, finschia-sdk

* lint

* Add CHANGELOG
  • Loading branch information
tkxkd0159 authored Jun 25, 2024
1 parent a348dc5 commit d067e36
Show file tree
Hide file tree
Showing 12 changed files with 228 additions and 733 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/setup-go@v3.5.0
- uses: actions/setup-go@v5
with:
go-version: '1.20'
- uses: actions/checkout@v3
go-version: '1.22'
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v3
- uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.51
version: v1.59
args: --timeout 10m
github-token: ${{ secrets.GITHUB_TOKEN }}
if: env.GIT_DIFF
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3.5.0
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- name: Check if difference
Expand Down Expand Up @@ -49,10 +49,10 @@ jobs:
test-cover:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3.5.0
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- name: Check if difference
Expand All @@ -71,7 +71,7 @@ jobs:
run: make test-cover
if: env.GIT_DIFF
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
Expand All @@ -80,10 +80,10 @@ jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3.5.0
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
- name: Display go version
run: go version
- name: Check if difference
Expand Down
13 changes: 3 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- goconst
Expand All @@ -23,14 +21,15 @@ linters:
- prealloc
- exportloopref
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unused
- varcheck

issues:
exclude-dirs: # following upstream rules
- x/wasm
- app
exclude-rules:
- text: "Use of weak random number generator"
linters:
Expand All @@ -46,12 +45,6 @@ linters-settings:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0
prealloc:
# XXX: we don't recommend using this linter before doing performance profiling.
# For most programs usage of prealloc will be a premature optimization.
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [Unreleased](https://github.com/Finschia/wasmd/compare/v0.3.0...HEAD)
## [Unreleased](https://github.com/Finschia/wasmd/compare/v0.3.1...HEAD)

### Features

Expand All @@ -14,6 +14,10 @@

### Document Updates

## [v0.3.1](https://github.com/Finschia/wasmd/releases/tag/v0.3.1) - 2024.06.25

### Build, CI
* [\#125](https://github.com/Finschia/wasmd/pull/125) Update outdated deps/ghactions

## [v0.3.0](https://github.com/Finschia/wasmd/releases/tag/v0.3.0) - 2024.02.27

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# docker build . -t finschia/wasmd:latest
# docker run --rm -it finschia/wasmd:latest /bin/sh
FROM golang:1.20-alpine AS go-builder
FROM golang:1.22-alpine AS go-builder
ARG arch=x86_64

# this comes from standard alpine nightly file
Expand Down Expand Up @@ -30,7 +30,7 @@ RUN echo "Ensuring binary is statically linked ..." \
&& (file /code/build/wasmd | grep "statically linked")

# --------------------------------------------------------
FROM alpine:3.15
FROM alpine:3.18

COPY --from=go-builder /code/build/wasmd /usr/bin/wasmd

Expand Down
6 changes: 0 additions & 6 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,6 @@ func TestAddr(addr string, bech string) (sdk.AccAddress, error) {
return res, nil
}

// CheckBalance checks the balance of an account.
func CheckBalance(t *testing.T, app *WasmApp, addr sdk.AccAddress, balances sdk.Coins) {
ctxCheck := app.BaseApp.NewContext(true, tmproto.Header{})
require.True(t, balances.IsEqual(app.BankKeeper.GetAllBalances(ctxCheck, addr)))
}

const DefaultGas = 1200000

// SignCheckDeliver checks a generated signed transaction and simulates a
Expand Down
18 changes: 9 additions & 9 deletions cmd/contract_tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@ func main() {
// This must be compiled beforehand and given to dredd as parameter, in the meantime the server should be running
h := hooks.NewHooks()
server := hooks.NewServer(hooks.NewHooksRunner(h))
h.BeforeAll(func(t []*transaction.Transaction) {
h.BeforeAll(func(_ []*transaction.Transaction) {
fmt.Println("Sleep 5 seconds before all modification")
})
h.BeforeEach(func(t *transaction.Transaction) {
h.BeforeEach(func(_ *transaction.Transaction) {
fmt.Println("before each modification")
})
h.Before("/version > GET", func(t *transaction.Transaction) {
h.Before("/version > GET", func(_ *transaction.Transaction) {
fmt.Println("before version TEST")
})
h.Before("/node_version > GET", func(t *transaction.Transaction) {
h.Before("/node_version > GET", func(_ *transaction.Transaction) {
fmt.Println("before node_version TEST")
})
h.BeforeEachValidation(func(t *transaction.Transaction) {
h.BeforeEachValidation(func(_ *transaction.Transaction) {
fmt.Println("before each validation modification")
})
h.BeforeValidation("/node_version > GET", func(t *transaction.Transaction) {
h.BeforeValidation("/node_version > GET", func(_ *transaction.Transaction) {
fmt.Println("before validation node_version TEST")
})
h.After("/node_version > GET", func(t *transaction.Transaction) {
h.After("/node_version > GET", func(_ *transaction.Transaction) {
fmt.Println("after node_version TEST")
})
h.AfterEach(func(t *transaction.Transaction) {
h.AfterEach(func(_ *transaction.Transaction) {
fmt.Println("after each modification")
})
h.AfterAll(func(t []*transaction.Transaction) {
h.AfterAll(func(_ []*transaction.Transaction) {
fmt.Println("after all modification")
})
server.Serve()
Expand Down
4 changes: 2 additions & 2 deletions contrib/prototools-docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16.8-alpine3.13 AS build
FROM golang:1.22-alpine3.18 AS build

#ARG PROTOTOOL_VERSION=1.10.0
ARG PROTODOC_VERSION=1.3.2
Expand Down Expand Up @@ -39,7 +39,7 @@ RUN GO111MODULE=on go get \

RUN upx --lzma /usr/local/bin/*

FROM golang:1.20-alpine
FROM golang:1.22-alpine3.18
ENV LD_LIBRARY_PATH=/lib64:/lib

WORKDIR /work
Expand Down
Loading

0 comments on commit d067e36

Please sign in to comment.