-
Notifications
You must be signed in to change notification settings - Fork 48
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 #46 from bnb-chain/develop
release: add changelog for release v0.0.5
- Loading branch information
Showing
285 changed files
with
49,718 additions
and
1,420 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
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,21 @@ | ||
# Protobuf files lint and backwards compatibility check job | ||
# reference: <https://docs.buf.build/ci-cd/github-actions> | ||
name: protobuf-check | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
protobuf-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- run: buf format --diff --exit-code |
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,49 @@ | ||
name: Docker | ||
|
||
on: | ||
push: | ||
# Publish `v1.2.3` tags as releases. | ||
tags: | ||
- v* | ||
|
||
env: | ||
IMAGE_NAME: ghcr.io/bnb-chain/greenfield | ||
IMAGE_SOURCE: https://github.com/bnb-chain/greenfield | ||
|
||
jobs: | ||
# Push image to GitHub Packages. | ||
push: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build image | ||
run: | | ||
docker build . \ | ||
--build-arg "GH_TOKEN=${{ secrets.GH_ACCESS_SECRET }}" \ | ||
--label "org.opencontainers.image.source=${IMAGE_SOURCE}" \ | ||
--label "org.opencontainers.image.revision=$(git rev-parse HEAD)" \ | ||
--label "org.opencontainers.image.version=$(git describe --tags --abbrev=0)" \ | ||
--label "org.opencontainers.image.licenses=LGPL-3.0,GPL-3.0" \ | ||
-f ./Dockerfile -t "${IMAGE_NAME}" | ||
- name: Log into registry | ||
run: echo "${{ secrets.GH_ACCESS_SECRET }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | ||
|
||
- name: Push image | ||
run: | | ||
# Strip git ref prefix from version | ||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | ||
# Strip "v" prefix from tag name | ||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') | ||
# Use Docker `latest` tag convention | ||
[ "$VERSION" == "master" ] && VERSION=latest | ||
echo IMAGE_NAME=$IMAGE_NAME | ||
echo VERSION=$VERSION | ||
docker tag $IMAGE_NAME $IMAGE_NAME:$VERSION | ||
docker tag $IMAGE_NAME $IMAGE_NAME:latest | ||
docker push $IMAGE_NAME:$VERSION | ||
docker push $IMAGE_NAME:latest | ||
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,54 @@ | ||
name: End to End Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
end-to-end-test: | ||
strategy: | ||
matrix: | ||
go-version: [1.18.x] | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
GOPRIVATE: github.com/bnb-chain | ||
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_SECRET }} | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
# In order: | ||
# * Module download cache | ||
# * Build cache (Linux) | ||
# * Build cache (Mac) | ||
# * Build cache (Windows) | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
~/Library/Caches/go-build | ||
%LocalAppData%\go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Setup GitHub Token | ||
run: git config --global url.https://[email protected]/.insteadOf https://github.com/ | ||
- name: Build | ||
run: | | ||
make build | ||
- name: run local chain | ||
run: bash ./deployment/localup/localup.sh all 1 | ||
- name: run cli test | ||
run: bash ./e2e/cli_test.sh |
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 |
---|---|---|
|
@@ -4,6 +4,9 @@ release/ | |
.idea/ | ||
.vscode/ | ||
.DS_Store | ||
spec/ | ||
Taskfile.yaml | ||
build/ | ||
vendor/ | ||
.local | ||
.local | ||
.task |
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 @@ | ||
linters: | ||
enable: | ||
- gofmt | ||
- goimports | ||
- errcheck | ||
- govet | ||
- staticcheck | ||
|
||
linters-settings: | ||
gofmt: | ||
# Simplify code: gofmt with `-s` option. | ||
# Default: true | ||
simplify: true | ||
# Apply the rewrite rules to the source before reformatting. | ||
# https://pkg.go.dev/cmd/gofmt | ||
# Default: [] | ||
rewrite-rules: | ||
- pattern: 'a[b:len(a)]' | ||
replacement: 'a[b:]' |
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.