Skip to content

Commit

Permalink
Merge pull request #598 from singnet/dev
Browse files Browse the repository at this point in the history
release v5.1.5
  • Loading branch information
semyon-dev authored Oct 15, 2024
2 parents d070f68 + f0a877f commit 76914fb
Show file tree
Hide file tree
Showing 110 changed files with 1,943 additions and 1,107 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,43 @@ name: build
on:
push:
branches: [ "master" ]
# pull_request:
# branches: [ "master" ]
pull_request:
branches: [ "master", "dev" ]
workflow_dispatch:

env:
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: ignore

jobs:
run_build:
runs-on: ubuntu-latest
steps:
build:
runs-on: ubuntu-latest
steps:

- name: clone repo
uses: actions/checkout@v3

- name: download and install
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: '1.23.1'

- name: protobuff install
run: |
sudo apt update
sudo apt install protobuf-compiler
- name: go_ins_1
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- name: install protoc (protobuf)
uses: arduino/setup-protoc@v3
with:
version: "27.2"
include-pre-releases: false

- name: go_ins_2
run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
- name: chmod +x
run: chmod +x ./scripts/install_deps && chmod +x ./scripts/build

- name: generate
run: go generate ./...
- name: install dependencies
run: ./scripts/install_deps

- name: check version
run: go version
- name: build linux
run: ./scripts/build linux amd64 dev

- name: check folder
run: ls
- name: build darwin
run: ./scripts/build darwin amd64 dev

- name: do build
run: go build snetd/main.go
- name: build windows
run: ./scripts/build windows amd64 dev
48 changes: 21 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
name: tests
on:
# push:
# branches: [ "master" ]
pull_request:
push:
branches: [ "master" ]
pull_request:
branches: [ "master", "dev" ]
workflow_dispatch:

env:
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: ignore

jobs:
run_tests:
runs-on: ubuntu-latest
steps:

run_tests:
runs-on: ubuntu-latest
steps:
- name: clone repo
uses: actions/checkout@v3

- name: download and install
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: '1.23.1'

- name: protobuff install
run: |
sudo apt update
sudo apt install protobuf-compiler
- name: go_ins_1
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest

- name: go_ins_2
run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

- name: generate
run: go generate ./...
- name: install protoc (protobuf)
uses: arduino/setup-protoc@v3
with:
version: "27.2"
include-pre-releases: false

- name: check version
run: go version
- name: chmod to allow run script
run: chmod +x ./scripts/install_deps

- name: check folder
run: ls
- name: install dependencies
run: ./scripts/install_deps

- name: do tests
- name: go tests
run: go test -v ./...
38 changes: 27 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
# idea cache
.idea/

# npm cache and configs
# npm cache
resources/blockchain/package-lock.json
resources/blockchain/node_modules/
resources/blockchain/build/
snetd.db

# configs
snetd.config.json
/vendor/
/build/
resources/blockchain/package-lock.json

# Autogenerated sources
# autogenerated sources
blockchain/snet-contracts.go
*.pb.go
/vendor/

# Binaries for programs and plugins
# binaries for programs and plugins
/build/
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, build with `go test -c`
# test binary, build with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
# output of the go coverage tool, specifically when used with LiteIDE
*.out

# vim temporary files
*~
*.swp
*.swo

# etcd server temporary directories
# etcd server directories
storage-*
*.pem
*log
data.etcd/
*.tmp
*.etcd

# certs and keys
*.pem
*.crt
*.key

# logs
*.log

# vscode
.vscode

# asdf
.tool-versions

54 changes: 54 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# This file configures github.com/golangci/golangci-lint.

run:
concurrency: 4
timeout: 5m
tests: false
issues-exit-code: 3
modules-download-mode: readonly
allow-parallel-runners: true

linters:
disable-all: true
enable:
- gosimple
- govet
- ineffassign
- misspell
- unconvert
- typecheck
- errcheck
# - unused
- staticcheck
- bidichk
- durationcheck
- goconst
- noctx
- whitespace
- revive # only certain checks enabled

linters-settings:
gofmt:
simplify: true
revive:
enable-all-rules: false
# here we enable specific useful rules
# see https://golangci-lint.run/usage/linters/#revive for supported rules
rules:
- name: receiver-naming
severity: warning
disabled: false
exclude: [ "" ]

issues:
exclude-dirs-use-default: true
exclude-dirs:
- bin
- build
- \.git
exclude-files:
- ".pb"
exclude-rules:
- linters:
- lll
source: "^//go:generate "
Loading

0 comments on commit 76914fb

Please sign in to comment.