forked from poly-rodr/go-ethereum-hdwallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
234 changed files
with
246 additions
and
49,004 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Lint & Test | ||
|
||
on: | ||
push: | ||
branches: [main,"go*"] | ||
pull_request: | ||
branches: ["*"] | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
|
||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Configure git | ||
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ | ||
|
||
- name: Lint | ||
run: make lint | ||
|
||
- name: Test | ||
run: make test | ||
|
||
env: | ||
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
GO_VERSION: '1.21' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Options for analysis running. | ||
run: | ||
# The default concurrency value is the number of available CPU. | ||
concurrency: 4 | ||
|
||
# Timeout for analysis, e.g. 30s, 5m. | ||
timeout: 10m | ||
|
||
# Exit code when at least one issue was found. | ||
# Default: 1 | ||
issues-exit-code: 2 | ||
|
||
# Enables skipping of directories: | ||
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$ | ||
# Default: true | ||
skip-dirs-use-default: true | ||
|
||
# If set we pass it to "go list -mod={option}". From "go help modules": | ||
# If invoked with -mod=readonly, the go command is disallowed from the implicit | ||
# automatic updating of go.mod described above. Instead, it fails when any changes | ||
# to go.mod are needed. This setting is most useful to check that go.mod does | ||
# not need updates, such as in a continuous integration and testing system. | ||
# If invoked with -mod=vendor, the go command assumes that the vendor | ||
# directory holds the correct copies of dependencies and ignores | ||
# the dependency descriptions in go.mod. | ||
# | ||
# Allowed values: readonly|vendor|mod | ||
# By default, it isn't set. | ||
modules-download-mode: readonly | ||
|
||
# Allow multiple parallel golangci-lint instances running. | ||
# If false (default) - golangci-lint acquires file lock on start. | ||
allow-parallel-runners: true | ||
|
||
go: '1.21' | ||
|
||
# output configuration options | ||
output: | ||
# Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity | ||
# | ||
# Multiple can be specified by separating them by comma, output can be provided | ||
# for each of them by separating format name and path by colon symbol. | ||
# Output path can be either `stdout`, `stderr` or path to the file to write to. | ||
# Example: "checkstyle:report.xml,json:stdout,colored-line-number" | ||
# | ||
# Default: colored-line-number | ||
format: github-actions |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,32 @@ | ||
.PHONY: all | ||
all: build | ||
|
||
.PHONY: install | ||
install: | ||
@go get -u github.com/miguelmota/go-ethereum-hdwallet | ||
|
||
.PHONY: build | ||
build: | ||
@go build . -o bin/hdwallet | ||
####################################################### | ||
############## formats, lint, and tests ############### | ||
####################################################### | ||
|
||
.PHONY: fmt | ||
fmt: | ||
@echo "----------------------------------------------------------------" | ||
@echo " ⚙️ Formatting code..." | ||
@echo "----------------------------------------------------------------" | ||
gofmt -s -w ./. | ||
|
||
.PHONY: lint | ||
lint: | ||
@echo "----------------------------------------------------------------" | ||
@echo " ⚙️ Linting code..." | ||
@echo "----------------------------------------------------------------" | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
golangci-lint run ./... -E gofmt --config=.golangci.yaml | ||
go mod tidy | ||
@echo "Linting complete!" | ||
|
||
.PHONY: test | ||
test: | ||
@go test -v . | ||
|
||
.PHONY: ensure | ||
ensure: | ||
@dep ensure | ||
|
||
.PHONY: deps/fix | ||
deps/fix: | ||
@cp -r "${GOPATH}/src/github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1" "vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/" | ||
@echo "----------------------------------------------------------------" | ||
@echo " ⚙️ Testign the code..." | ||
@echo "----------------------------------------------------------------" | ||
GOPRIVATE=${PRIVATE_REPOS} go test ./... -v | ||
@echo "Tests complete!" | ||
|
||
.PHONY: run/example/1 | ||
run/example/1: | ||
@go run example/derive.go | ||
|
||
.PHONY: run/example/2 | ||
run/example/2: | ||
@go run example/sign.go | ||
|
||
.PHONY: run/example/3 | ||
run/example/3: | ||
@go run example/seed.go | ||
|
||
.PHONY: run/example/4 | ||
run/example/4: | ||
@go run example/keys.go | ||
|
||
.PHONY: release | ||
release: | ||
@rm -rf dist | ||
@goreleaser | ||
.PHONE: build | ||
build: | ||
@echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.