Skip to content

Commit

Permalink
Merge branch 'master' into hariom/gno-mod-why
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Feb 12, 2024
2 parents 6530315 + 59d8787 commit 52f238d
Show file tree
Hide file tree
Showing 352 changed files with 9,474 additions and 4,702 deletions.
71 changes: 49 additions & 22 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,40 +1,67 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Primary repo maintainers.
* @gnolang/tech-staff

* @gnolang/tech-staff

# Tendermint2 (Gno version).
tm2/* @gnolang/tech-staff
tm2/pkg @jaekwon @moul
/tm2/* @gnolang/tech-staff
/tm2/pkg @jaekwon @piux2 @moul @zivkovicmilos
/tm2/pkg/crypto @jaekwon @moul @gnolang/security
# TODO: add per package exceptions

# ...

# Docs & Content.
docs/ @gnolang/devrels @gnolang/tech-staff
misc/docusaurus/ @gnolang/devrels @gnolang/tech-staff
*.md @gnolang/tech-staff
# TODO: add non-tech people here.

/docs/ @gnolang/devrels
/misc/docusaurus/ @gnolang/devrels
/README.md @gnolang/devrels
/.gitpod.yml @gnolang/devrels

# Gno examples and default contracts.
examples/* @gnolang/tech-staff
/examples/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/r/gnoland/ @moul
/examples/gno.land/r/gov/ @moul
/examples/gno.land/r/sys/ @moul
/examples/gno.land/r/worx/ @moul
/examples/gno.land/r/x @gnolang/devrels
# TODO: add people from the community here.

/examples/gno.land/r/jaekwon/ @jaekwon
/examples/gno.land/r/manfred/ @moul

# Gno.land.
gno.land/* @gnolang/tech-staff

/gno.land/ @moul
/gno.land/pkg/integration @gfanton
#...

# GnoVM/Gnolang.
gnovm/* @gnolang/tech-staff
gnovm/stdlibs @jaekwon @moul
gnovm/pkg/gnolang @jaekwon @moul
/gnovm/ @gnolang/tech-staff
/gnovm/stdlibs @jaekwon @thehowl
/gnovm/tests @jaekwon @piux2 @thehowl @moul
/gnovm/cmd/gno @jaekwon @thehowl @harry-hov @moul
/gnovm/pkg/gnolang @jaekwon @piux2 @thehowl @moul
/gnovm/pkg/doc @thehowl
/gnovm/pkg/gnomod @harry-hov
/gnovm/pkg/integration @gfanton
#/gnovm/pkg/gnoenv
#/gnovm/pkg/repl

# Contribs
/contribs/ @gnolang/tech-staff
/contribs/gnodev @gfanton
/contribs/gnokeykc @moul
/contribs/gnomd @moul
#...

# Misc
/misc/ @gnolang/tech-staff
/misc/loop @moul @gnolang/devops
/misc/deployments @moul @gnolang/devops
/misc/genstd @thehowl
#...

# Special files.
PLAN.md @jaekwon @moul
PHILOSOPHY.md @jaekwon @moul
CONTRIBUTING.md @jaekwon @moul
LICENSE.md @jaekwon @moul
.github/CODEOWNERS @jaekwon @moul
/PLAN.md @jaekwon @moul
/PHILOSOPHY.md @jaekwon
/CONTRIBUTING.md @jaekwon @moul @gnolang/tech-staff
/LICENSE.md @jaekwon
/.github/ @moul @gnolang/tech-staff
/.github/CODEOWNERS @jaekwon @moul
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ updates:
interval: "daily"
labels:
- "github_actions"
groups:
actions:
patterns:
- "*"

# Maintain dependencies for top level Go modules
- package-ecosystem: gomod
Expand All @@ -17,6 +21,18 @@ updates:
interval: weekly
labels:
- "dependencies"
groups:
golang-x:
patterns:
- "golang.org/x/*"
dbs:
patterns:
- "github.com/linxGnu/grocksdb"
- "go.etcd.io/bbolt"
- "github.com/dgraph-io/badger/v3"
everything-else:
patterns:
- "*"
open-pull-requests-limit: 10
pull-request-branch-name:
separator: "-"
Expand Down
12 changes: 12 additions & 0 deletions .github/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ linters:
- errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13
- gofumpt # Stricter gofmt
- unused # Checks Go code for unused constants, variables, functions and types
- gomodguard # Enforces an allow and block list for direct Go module dependencies

linters-settings:
gofmt:
Expand All @@ -59,6 +60,17 @@ linters-settings:
- opinionated
- performance
- style
gomodguard:
blocked:
modules:
- log/slog:
recommendations:
- golang.org/x/exp
reason: "the minimum go version for the monorepo is 1.20"
versions:
- go.uber.org/zap/exp:
version: "> 0.1.0"
reason: "this version of zap/exp is a requirement until we upgrade to go 1.21 (https://github.com/uber-go/zap/blob/master/exp/CHANGELOG.md)"

issues:
whole-files: true
Expand Down
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@

":package: :mountain: gno.land":
- "gno.land/**/*"

":book: documentation":
- docs/**/*"
1 change: 1 addition & 0 deletions .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- "1.21.x"
program:
- "gnomd"
- "gnodev"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/db-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ jobs:
wget http://ftp.us.debian.org/debian/pool/main/l/leveldb/libleveldb-dev_1.22-3_amd64.deb
sudo dpkg -i *.deb
- name: Set environment variables for debug mode
if: env.ACTIONS_STEP_DEBUG == 'true'
run: |
export LOG_PATH_DIR=${{ runner.temp }}/logs
mkdir -p $LOG_PATH_DIR
echo "LOG_LEVEL=debug" >> $GITHUB_ENV
echo "LOG_PATH_DIR=$LOG_PATH_DIR" >> $GITHUB_ENV
# test ./pkgs/db
- name: test ./tm2/pkg/db
run: go test -tags ${{ matrix.tags }} ./tm2/pkg/db/...
20 changes: 10 additions & 10 deletions .github/workflows/dependabot-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
tidy_go_mods:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -21,21 +23,19 @@ jobs:
go-version: 1.21.x

- name: Tidy all Go mods
env:
VERIFY_MOD_SUMS: false
run: |
set -e
# Find all go.mod files
gomods=$(find . -type f -name go.mod)
# Ensure Make is installed
make --version
# Tidy each go.mod file
for modfile in $gomods; do
dir=$(dirname "$modfile")
# Run go mod tidy in the directory
(cd "$dir" && go mod tidy -v) || exit 1
done
# Run the tidy target
make tidy
- name: Commit changes, if any
uses: stefanzweifel/git-auto-commit-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
skip_dirty_check: false # Enable dirty check, and skip unnecessary committing
commit_message: "Run 'go mod tidy' via GitHub Actions"
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Log in to GitHub Container Registry
if: (github.event_name != 'pull_request')
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- name: Set environment variables for debug mode
if: env.ACTIONS_STEP_DEBUG == 'true'
run: |
export LOG_PATH_DIR=${{ runner.temp }}/logs
mkdir -p $LOG_PATH_DIR
echo "LOG_LEVEL=debug" >> $GITHUB_ENV
echo "LOG_PATH_DIR=$LOG_PATH_DIR" >> $GITHUB_ENV
- run: go install -v ./gnovm/cmd/gno
- run: go run ./gnovm/cmd/gno test --verbose ./examples/...
lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
go-version: "1.21.x"
- run: "cd misc/gendocs && make install gen"
- uses: actions/configure-pages@v3
- uses: actions/configure-pages@v4
id: pages
- uses: actions/upload-pages-artifact@v2
with:
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
- gnokey
- gnoweb
- gnofaucet
- gnotxsync
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
Expand All @@ -60,32 +59,39 @@ jobs:
- _test.gnoland
- _test.gnokey
- _test.pkgs
- _test.gnoweb
- _test.gnoweb
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- name: Set environment variables for debug mode
if: ${{ runner.debug == 1 }}
run: |
export LOG_PATH_DIR=${{ runner.temp }}/logs-go${{ matrix.goversion }}-${{ matrix.args }}
mkdir -p $LOG_PATH_DIR
echo "LOG_LEVEL=debug" >> $GITHUB_ENV
echo "LOG_PATH_DIR=$LOG_PATH_DIR" >> $GITHUB_ENV
- name: test
working-directory: gno.land
run: |
export GOPATH=$HOME/go
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic"
export LOG_DIR="${{ runner.temp }}/logs/test-${{ matrix.goversion }}-gnoland"
make ${{ matrix.args }}
- name: Upload Test Log
if: always()
uses: actions/upload-artifact@v3
with:
name: logs-test-gnoland-go${{ matrix.goversion }}
path: ${{ runner.temp }}/logs/**/*.log
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
with:
name: ${{runner.os}}-coverage-gnoland-${{ matrix.args}}-${{matrix.goversion}}
path: ./gno.land/coverage.out
- name: Upload Debug Logs
uses: actions/upload-artifact@v3
if: ${{ always() && runner.debug == 1 }}
with:
name: logs-test-go${{ matrix.goversion }}-${{ matrix.args }}
path: ${{ env.LOG_PATH_DIR }}/**/*

upload-coverage:
needs: test
Expand All @@ -99,7 +105,7 @@ jobs:
uses: codecov/codecov-action@v3
with:
directory: ${{ runner.temp }}/coverage
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }}

docker-integration:
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/gnovm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- name: Set environment variables for debug mode
if: ${{ runner.debug == 1 }}
run: |
export LOG_PATH_DIR=${{ runner.temp }}/logs-go${{ matrix.goversion }}-${{ matrix.args }}
mkdir -p $LOG_PATH_DIR
echo "LOG_LEVEL=debug" >> $GITHUB_ENV
echo "LOG_PATH_DIR=$LOG_PATH_DIR" >> $GITHUB_ENV
- name: test
working-directory: gnovm
env:
Expand All @@ -92,6 +100,12 @@ jobs:
with:
name: ${{runner.os}}-coverage-gnovm-${{ matrix.args}}-${{matrix.goversion}}
path: ${{ env.COVERAGE_DIR }}
- name: Upload Debug Logs
uses: actions/upload-artifact@v3
if: ${{ always() && runner.debug == 1 }}
with:
name: logs-test-go${{ matrix.goversion }}-${{ matrix.args }}
path: ${{ env.LOG_PATH_DIR }}/**/*

upload-coverage:
needs: test
Expand Down Expand Up @@ -129,6 +143,6 @@ jobs:
uses: codecov/codecov-action@v3
with:
files: ${{ env.COVERAGE_PROFILE }}
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }}

33 changes: 13 additions & 20 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:

# inspired by:
# https://github.com/Jerome1337/gofmt-action/blob/d5eabd189843f1d568286a54578159978b7c0fb1/entrypoint.sh
- name: Check gofumpt
- name: Check gofumpt / goimports
run: |
output="$(GOFMT_FLAGS=-l make -s fmt)"
output="$(GOFMT_FLAGS=-l GOIMPORTS_FLAGS=-l make -s fmt)"
if [ ! -z "$output" ]; then
echo "The following files are not properly formatted; run 'make fmt' to format them."
echo "The following files are not properly formatted; run 'make fmt imports' to format them."
echo "$output"
exit 1
else
Expand All @@ -70,22 +70,15 @@ jobs:
with:
go-version: 1.21.x

- name: Install make
run: sudo apt-get install -y make

- name: Check go.mods
env:
VERIFY_MOD_SUMS: true
run: |
set -xe
# Find all go.mod files
gomods=$(find . -type f -name go.mod)
# Calculate sums for all go.mod files
sums=$(sha256sum $gomods)
# Iterate over each go.mod file
for modfile in $gomods; do
dir=$(dirname "$modfile")
# Run go mod tidy in the directory
(cd "$dir" && go mod tidy -v) || exit 1
done
# Verify the sums
echo "$sums" | sha256sum -c
# Ensure Make is installed
make --version
# Run the tidy target
make tidy
Loading

0 comments on commit 52f238d

Please sign in to comment.