-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from xrplevm/chore/bump-to-v3
Bump to verison 3
- Loading branch information
Showing
80 changed files
with
1,150 additions
and
586 deletions.
There are no files selected for viewing
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,6 +1,20 @@ | ||
.github | ||
.gitignore | ||
.idea | ||
*Dockerfile | ||
Dockerfile | ||
release | ||
build | ||
build | ||
.dockerignore | ||
|
||
vue/node_modules | ||
vue/dist | ||
build/ | ||
release/ | ||
.idea/ | ||
.vscode/ | ||
.DS_Store | ||
|
||
|
||
.exrpd/ | ||
|
||
bin/ |
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 |
---|---|---|
|
@@ -7,4 +7,6 @@ release/ | |
.DS_Store | ||
|
||
|
||
.exrpd/ | ||
.exrpd/ | ||
|
||
bin/ |
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,8 +1,59 @@ | ||
run: | ||
timeout: 10m | ||
skip-dirs: | ||
- docs | ||
issues: | ||
exclude: | ||
# Exclude deprecated rule | ||
- SA1019 | ||
tests: true | ||
timeout: 5m | ||
concurrency: 4 | ||
|
||
linters: | ||
enable: | ||
- dogsled | ||
- dupl | ||
- errcheck | ||
- goconst | ||
- gocritic | ||
- gofumpt | ||
- revive | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- nakedret | ||
- prealloc | ||
- exportloopref | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- nolintlint | ||
- asciicheck | ||
- exportloopref | ||
- gofumpt | ||
- gomodguard | ||
|
||
linters-settings: | ||
dogsled: | ||
max-blank-identifiers: 3 | ||
golint: | ||
min-confidence: 0 | ||
maligned: | ||
suggest-new: true | ||
misspell: | ||
locale: US | ||
nolintlint: | ||
allow-unused: false | ||
allow-leading-space: true | ||
require-explanation: false | ||
require-specific: false | ||
gofumpt: | ||
lang-version: "1.22" | ||
gomodguard: | ||
blocked: | ||
versions: # List of blocked module version constraints | ||
- https://github.com/etcd-io/etcd: # Blocked module with version constraint | ||
version: ">= 3.4.10 || ~3.3.23" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
reason: "CVE-2020-15114; CVE-2020-15136; CVE-2020-15115" # Reason why the version constraint exists. (Optional) | ||
- https://github.com/dgrijalva/jwt-go: # Blocked module with version constraint | ||
version: ">= 4.0.0-preview1" # Version constraint, see https://github.com/Masterminds/semver#basic-comparisons | ||
reason: "CVE-2020-26160" # Reason why the version constraint exists. (Optional) |
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,35 +1,44 @@ | ||
FROM golang:1.20 AS base | ||
FROM golang:1.22.2 AS base | ||
USER root | ||
RUN apt update && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl | ||
RUN curl https://get.ignite.com/cli@v0.27.2! | bash | ||
WORKDIR /go/src/github.com/xrplevm/node | ||
ca-certificates | ||
WORKDIR /app | ||
COPY . . | ||
RUN make install | ||
|
||
|
||
FROM base AS build | ||
ARG VERSION=0.0.0 | ||
RUN ignite chain build --release --release.prefix exrp_$VERSION -t linux:amd64 -v | ||
RUN tar -xf /go/src/github.com/xrplevm/node/release/exrp_${VERSION}_linux_amd64.tar.gz -C /usr/bin | ||
RUN make build | ||
|
||
|
||
FROM base AS integration | ||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin | ||
RUN golangci-lint run | ||
RUN make lint | ||
# Unit tests | ||
RUN go test $(go list ./... | grep -v github.com/xrplevm/node/tests/e2e/poa) | ||
RUN go test $(go list ./... | grep -v github.com/xrplevm/node/v2/tests/e2e) | ||
# End to end tests | ||
# TODO: Temporary disabled e2e tests | ||
# RUN TEST_CLEANUP_DIR=false go test -p 1 -v -timeout 30m ./tests/e2e/... | ||
RUN <<EOF | ||
#!/bin/bash | ||
retry() { | ||
local retries="$1" | ||
local command="$2" | ||
$command | ||
local exit_code=$? | ||
if [[ $exit_code -ne 0 && $retries -gt 0 ]]; then | ||
retry $(($retries - 1)) "$command" | ||
else | ||
return $exit_code | ||
fi | ||
} | ||
retry 5 "go test -p 1 -v -timeout 30m ./tests/e2e/..." | ||
EOF | ||
RUN touch /test.lock | ||
|
||
FROM golang:1.20 AS release | ||
FROM golang:1.22.2 AS release | ||
WORKDIR / | ||
COPY --from=integration /test.lock /test.lock | ||
COPY --from=build /go/src/github.com/xrplevm/node/release /binaries | ||
COPY --from=build /usr/bin/exrpd /usr/bin/exrpd | ||
COPY --from=build /app/bin/exrpd /usr/bin/exrpd | ||
ENTRYPOINT ["/bin/sh", "-ec"] | ||
CMD ["exrpd"] |
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.