Skip to content

Commit

Permalink
chore: Merge remote-tracking branch 'teritori/master' into teritori-u…
Browse files Browse the repository at this point in the history
…nified
  • Loading branch information
n0izn0iz committed Feb 15, 2024
2 parents bebea69 + 6fb3317 commit 26fcec5
Show file tree
Hide file tree
Showing 1,084 changed files with 60,843 additions and 9,827 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.gno linguist-language=Go
*.pb.go linguist-generated merge=ours -diff
go.sum linguist-generated text
gnovm/stdlibs/native.go linguist-generated
gnovm/tests/stdlibs/native.go linguist-generated
15 changes: 15 additions & 0 deletions .github/.fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 3

# https://github.com/fossas/fossa-cli/blob/master/docs/references/files/fossa-yml.md

project:
id: github.com/gnolang/gno
name: gno

targets:
only:
- type: gomod

paths:
exclude:
- ./misc/
70 changes: 49 additions & 21 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,39 +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/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
3 changes: 3 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ flag_management:
- name: gno.land
paths:
- gno.land
- name: misc
paths:
- misc
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
39 changes: 36 additions & 3 deletions .github/golangci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
run:
timeout: 5m
concurrency: 8
timeout: 10m
issue-exit-code: 1
tests: true
skip-dirs-use-default: true
modules-download-mode: readonly
allow-parallel-runners: false
go: ""

output:
uniq-by-line: false
path-prefix: ""
sort-results: true

linters:
fast: false
disable-all: true
enable:
- whitespace # Tool for detection of leading and trailing whitespace
Expand All @@ -21,12 +32,12 @@ linters:
- gofmt # Whether the code was gofmt-ed
- goimports # Unused imports
- goconst # Repeated strings that could be replaced by a constant
#- forcetypeassert # Finds forced type assertions
- dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f())
#- dupl # Code clone detection
- errname # Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- 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 @@ -42,9 +53,31 @@ linters-settings:
checks: [ "all", "-ST1022", "-ST1003" ]
errorlint:
asserts: false
gocritic:
enabled-tags:
- diagnostic
- experimental
- 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
max-issues-per-linter: 0
max-same-issues: 0
new: false
fix: false
exclude-rules:
- path: _test\.go
linters:
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/**/*"
2 changes: 1 addition & 1 deletion .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v1.6.2
- uses: toshimaru/auto-author-assign@v2.0.1
36 changes: 36 additions & 0 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: code generation

on:
push:
branches: [ "master" ]
pull_request:
paths:
- 'gnovm/stdlibs/**'
- 'gnovm/tests/stdlibs/**'
- 'misc/genstd'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
generated:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: Checkout code
uses: actions/checkout@v4

- name: Check generated files are up to date
run: |
go generate -x ./...
if [ "$(git status -s)" != "" ]; then
echo "command 'go generate' creates file that differ from git tree, please run 'go generate' and commit:"
git status -s
exit 1
fi
36 changes: 36 additions & 0 deletions .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: contribs

on:
push:
branches: [ "master" ]
pull_request:
paths:
- "contribs/**"
- ".github/workflows/contribs.yml"
- "gnovm/**.go"
- "gno.land/**.go"
- "tm2/**.go"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
install:
strategy:
fail-fast: false
matrix:
goversion: # two latest versions
- "1.21.x"
program:
- "gnomd"
- "gnodev"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- run: make install ${{ matrix.program }}
working-directory: contribs
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/...
41 changes: 41 additions & 0 deletions .github/workflows/dependabot-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Dependabot Tidy Go Mods

on:
pull_request:
paths:
- '.github/workflows/**'
- '**/go.mod'
- '**/go.sum'

jobs:
tidy_go_mods:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: Tidy all Go mods
env:
VERIFY_MOD_SUMS: false
run: |
# Ensure Make is installed
make --version
# 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
Loading

0 comments on commit 26fcec5

Please sign in to comment.