Skip to content

Commit

Permalink
chore(deps): update dependensies to latest version (#1202)
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy authored Apr 8, 2024
1 parent d614699 commit b6c6b8b
Show file tree
Hide file tree
Showing 35 changed files with 637 additions and 334 deletions.
1 change: 1 addition & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ coverage:

ignore:
- "*/mock.go"
- "www/grpc/gen"
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:

steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Test with coverage
run: go test -gcflags=-l -coverprofile=coverage.txt -covermode=atomic ./...
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deadlock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:

steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Test with data race detection
run: make test_race
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: |
sudo apt update
sudo apt install libgtk-3-dev libcairo2-dev libglib2.0-dev
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Build the binary
run: make build_gui

- name: Installing golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.1
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2

- name: Lint check
run: BUILD_TAG=gtk make check
Expand All @@ -39,15 +39,15 @@ jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: brew install gtk+3

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Build the binary
run: make build_gui
Expand All @@ -60,7 +60,7 @@ jobs:
shell: msys2 {0}
steps:

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: msys2/setup-msys2@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:

steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Installing golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2

- name: Formatting and linting the project
run: make check
30 changes: 15 additions & 15 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
checksums: ${{ steps.calc_checksums.outputs.checksums }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: |
sudo apt update
sudo apt install zip
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Create release files
run: bash ./.github/releasers/releaser_cli.sh
Expand Down Expand Up @@ -59,17 +59,17 @@ jobs:
checksums: ${{ steps.calc_checksums.outputs.checksums }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: |
sudo apt update
sudo apt install libgtk-3-dev libcairo2-dev libglib2.0-dev libfuse2 pkg-config dpkg dpkg-dev
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Create release files
run: bash ./.github/releasers/releaser_gui_linux.sh
Expand Down Expand Up @@ -103,15 +103,15 @@ jobs:
checksums: ${{ steps.calc_checksums.outputs.checksums }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: brew install gtk+3 librsvg create-dmg coreutils pkg-config gdk-pixbuf

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Create release files
run: bash ./.github/releasers/releaser_gui_macos.sh
Expand Down Expand Up @@ -155,15 +155,15 @@ jobs:
checksums: ${{ steps.calc_checksums.outputs.checksums }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Dependencies
run: brew install gtk+3 librsvg create-dmg coreutils pkg-config gdk-pixbuf

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Create release files
run: bash ./.github/releasers/releaser_gui_macos.sh
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
shell: msys2 {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: msys2/setup-msys2@v2
with:
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
needs: [build-cli, build-gui-linux, build-gui-macos, build-gui-macos-arm, build-gui-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Create SHA256SUMS file
run: |
echo "${{ needs.build-cli.outputs.checksums }}" >> SHA256SUMS
Expand All @@ -262,7 +262,7 @@ jobs:
needs: [checksums]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Create Downloader file
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: '1.22.2'

- name: Unit tests
run: make unit_test
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
FROM golang:1.21.5-alpine3.18 as builder
FROM golang:1.22.2-alpine3.19 as builder

RUN apk add --no-cache git gmp-dev build-base g++ openssl-dev
ADD . /pactus

# Building pactus-daemon
RUN cd /pactus && \
go build -ldflags "-s -w" -trimpath -o ./build/pactus-daemon ./cmd/daemon && \
go build -ldflags "-s -w" -trimpath -o ./build/pactus-wallet ./cmd/wallet
CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-daemon ./cmd/daemon && \
CGO_ENABLED=0 go build -ldflags "-s -w" -trimpath -o ./build/pactus-wallet ./cmd/wallet


## Copy binary files from builder into second container
FROM golang:1.21.5-alpine3.18
FROM alpine:3.19

COPY --from=builder /pactus/build/pactus-daemon /usr/bin
COPY --from=builder /pactus/build/pactus-wallet /usr/bin
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ all: build test
### Tools needed for development
devtools:
@echo "Installing devtools"
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.12
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.12
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.19.1
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.19.1
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.33
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3
go install github.com/NathanBaulch/[email protected]
go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected]
go install github.com/bufbuild/buf/cmd/buf@v1.25.0
go install github.com/bufbuild/buf/cmd/buf@v1.30.1
go install mvdan.cc/gofumpt@latest
go install github.com/rakyll/[email protected]
go install github.com/rakyll/[email protected].7
go install github.com/pacviewer/jrpc-gateway/[email protected]

########################################
Expand Down
8 changes: 4 additions & 4 deletions cmd/gtk/startup_assistant.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ func pageSeedConfirm(assistant *gtk.Assistant, assistFunc assistantFunc,
textViewConfirmSeed.SetMonospace(true)
textViewConfirmSeed.SetSizeRequest(0, 80)

textViewConfirmSeed.Connect("paste_clipboard", func(textView *gtk.TextView) {
textViewConfirmSeed.Connect("paste_clipboard", func(_ *gtk.TextView) {
showInfoDialog(assistant, "Opps, no copy paste!")
textViewConfirmSeed.StopEmission("paste_clipboard")
})

seedConfirmTextBuffer, err := textViewConfirmSeed.GetBuffer()
fatalErrorCheck(err)

seedConfirmTextBuffer.Connect("changed", func(buf *gtk.TextBuffer) {
seedConfirmTextBuffer.Connect("changed", func(_ *gtk.TextBuffer) {
mnemonic1 := getTextViewContent(textViewSeed)
mnemonic2 := getTextViewContent(textViewConfirmSeed)
space := regexp.MustCompile(`\s+`)
Expand Down Expand Up @@ -430,11 +430,11 @@ func pagePassword(assistant *gtk.Assistant, assistFunc assistantFunc) (*gtk.Widg
assistantPageComplete(assistant, pageWidget, false)
}
}
entryPassword.Connect("changed", func(entry *gtk.Entry) {
entryPassword.Connect("changed", func(_ *gtk.Entry) {
validatePassword()
})

entryConfirmPassword.Connect("changed", func(entry *gtk.Entry) {
entryConfirmPassword.Connect("changed", func(_ *gtk.Entry) {
validatePassword()
})

Expand Down
8 changes: 4 additions & 4 deletions cmd/gtk/widget_wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func buildWidgetWallet(model *walletModel) (*widgetWallet, error) {

item.SetUseUnderline(true)
item.Show()
item.Connect("activate", func(item *gtk.MenuItem) bool {
item.Connect("activate", func(_ *gtk.MenuItem) bool {
w.onUpdateLabel()

return false
Expand All @@ -114,7 +114,7 @@ func buildWidgetWallet(model *walletModel) (*widgetWallet, error) {

item.SetUseUnderline(true)
item.Show()
item.Connect("activate", func(item *gtk.MenuItem) bool {
item.Connect("activate", func(_ *gtk.MenuItem) bool {
w.onShowDetails()

return false
Expand All @@ -127,15 +127,15 @@ func buildWidgetWallet(model *walletModel) (*widgetWallet, error) {

item.SetUseUnderline(true)
item.Show()
item.Connect("activate", func(item *gtk.MenuItem) bool {
item.Connect("activate", func(_ *gtk.MenuItem) bool {
w.onShowPrivateKey()

return false
})
menu.Append(item)

treeViewWallet.Connect("button-press-event",
func(treeViewWallet *gtk.TreeView, event *gdk.Event) bool {
func(_ *gtk.TreeView, event *gdk.Event) bool {
eventButton := gdk.EventButtonNewFromEvent(event)
if eventButton.Type() == gdk.EVENT_BUTTON_PRESS &&
eventButton.Button() == gdk.BUTTON_SECONDARY {
Expand Down
Loading

0 comments on commit b6c6b8b

Please sign in to comment.