-
Notifications
You must be signed in to change notification settings - Fork 17
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
15 changed files
with
245 additions
and
45 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.idea | ||
.vscode | ||
node_modules | ||
release | ||
.DS_Store | ||
/scripts/ | ||
test/.env | ||
chain | ||
|
||
build |
Validating CODEOWNERS rules …
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,3 +1,3 @@ | ||
# https://help.github.com/articles/about-codeowners | ||
|
||
* @johnletey @mbreithecker @troykessler | ||
* @mbreithecker @troykessler @shifty11 |
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
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,9 @@ | ||
name: run all jobs | ||
on: push | ||
|
||
jobs: | ||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
|
||
test: | ||
uses: ./.github/workflows/test.yml |
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,29 +1,39 @@ | ||
on: push | ||
name: lint | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
buf: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Run `git checkout` | ||
- uses: actions/checkout@v3 | ||
# Checkout the repository | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
# Install `buf` | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- name: Install `buf` | ||
uses: bufbuild/buf-setup-action@v1 | ||
with: | ||
github_token: ${{ github.token }} | ||
# Lint Protobuf files | ||
- uses: bufbuild/buf-lint-action@v1 | ||
- name: Lint Protobuf files | ||
uses: bufbuild/buf-lint-action@v1 | ||
with: | ||
buf_token: ${{ secrets.BUF_TOKEN }} | ||
|
||
# TODO(@john): Figure out why linting passes locally but not here. | ||
# golangci: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# # Run `git checkout` | ||
# - uses: actions/checkout@v3 | ||
# # Install `go` | ||
# - uses: actions/setup-go@v3 | ||
# # Lint Go files | ||
# - uses: golangci/golangci-lint-action@v3 | ||
# with: | ||
# args: --timeout=10m | ||
golangci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
# Setup Golang | ||
- name: 🐿 Setup Golang | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
# Lint go files with golangci-lint | ||
- name: Lint go files with golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: --timeout=10m |
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,19 @@ | ||
name: test | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
# Setup Golang | ||
- name: 🐿 Setup Golang | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
# Test & coverage report creation | ||
- name: Test & coverage report creation | ||
run: go test -cover -mod=readonly ./x/... |
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,27 @@ | ||
ARG IMG_TAG=latest | ||
|
||
# Compile the kyved binary | ||
FROM golang:1.20-alpine AS kyved-builder | ||
|
||
# Install make | ||
RUN apk add --no-cache make | ||
|
||
WORKDIR /go/src | ||
|
||
# Install dependencies | ||
COPY go.mod go.sum* ./ | ||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
--mount=type=cache,target=/root/go/pkg/mod \ | ||
go mod download | ||
COPY . . | ||
|
||
ENV ENV=mainnet | ||
RUN make install | ||
|
||
# Copy binary to a distroless container | ||
FROM gcr.io/distroless/static-debian11:$IMG_TAG | ||
|
||
COPY --from=kyved-builder "/go/bin/kyved" /usr/local/bin/ | ||
EXPOSE 26656 26657 1317 9090 | ||
|
||
ENTRYPOINT ["kyved"] |
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
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
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
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
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
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
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.