Skip to content

Commit

Permalink
Merge branch 'feat/opentelemetry-setup' of github.com:deelawn/gno int…
Browse files Browse the repository at this point in the history
…o feat/opentelemetry-setup
  • Loading branch information
deelawn committed Jan 31, 2024
2 parents 762a05e + 64d447a commit d1299e4
Show file tree
Hide file tree
Showing 622 changed files with 28,776 additions and 3,195 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ PHILOSOPHY.md @jaekwon @moul
CONTRIBUTING.md @jaekwon @moul
LICENSE.md @jaekwon @moul
.github/CODEOWNERS @jaekwon @moul

# Documentation.
docs/* @gnolang/devrels
27 changes: 24 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,11 @@ 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

linters-settings:
gofmt:
Expand All @@ -42,9 +52,20 @@ linters-settings:
checks: [ "all", "-ST1022", "-ST1003" ]
errorlint:
asserts: false
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style

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
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
35 changes: 35 additions & 0 deletions .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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"
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
21 changes: 20 additions & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
with:
go-version: ${{ matrix.goversion }}
- run: go install -v ./gnovm/cmd/gno
- run: go run ./gnovm/cmd/gno test --verbose ./examples
- run: go run ./gnovm/cmd/gno test --verbose ./examples/...
lint:
strategy:
fail-fast: false
Expand All @@ -73,3 +73,22 @@ jobs:
- run: go run ./gnovm/cmd/gno lint --verbose ./examples/gno.land/r/gnoland
- run: go run ./gnovm/cmd/gno lint --verbose ./examples/gno.land/r/system
# TODO: track coverage
mod-tidy:
strategy:
fail-fast: false
matrix:
go-version: [ "1.21.x" ]
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v4
- run: |
GNO_CMD="$(pwd)/gnovm/cmd/gno"
# Find all directories containing gno.mod file
find ./examples -name "gno.mod" -execdir go run "$GNO_CMD" mod tidy \;
# Check if there are changes after running gno mod tidy
git diff --exit-code || (echo "Some gno.mod files are not tidy, please run 'make tidy'." && exit 1)
7 changes: 4 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: "cd misc/devdeps && make install"
- run: "cd misc/gendocs && make gen"
- run: "find docs/ -type f -ls"
- uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- run: "cd misc/gendocs && make install gen"
- uses: actions/configure-pages@v3
id: pages
- uses: actions/upload-pages-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gnoland.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- _test.gnoland
- _test.gnokey
- _test.pkgs
#- _test.gnoweb # this test should be rewritten to run an inmemory localnode
- _test.gnoweb
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand Down
43 changes: 38 additions & 5 deletions .github/workflows/gnovm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,35 +67,68 @@ jobs:
- _test.gnolang.other
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COVERAGE_DIR: "/tmp/coverage"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- name: test
working-directory: gnovm
env:
TXTARCOVERDIR: ${{ env.COVERAGE_DIR }}
run: |
mkdir -p $COVERAGE_DIR
# Setup testing environements variables
export GOPATH=$HOME/go
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic"
export GOTEST_FLAGS="-v -p 1 -timeout=30m -covermode=atomic -test.gocoverdir=$COVERAGE_DIR"
# Run target test
make ${{ matrix.args }}
- uses: actions/upload-artifact@v3
if: ${{ runner.os == 'Linux' && matrix.goversion == '1.21.x' }}
with:
name: ${{runner.os}}-coverage-gnovm-${{ matrix.args}}-${{matrix.goversion}}
path: ./gnovm/coverage.out
path: ${{ env.COVERAGE_DIR }}

upload-coverage:
needs: test
runs-on: ubuntu-latest
env:
COVERAGE_DATA: /tmp/coverage/coverage-raw
COVERAGE_OUTPUT: /tmp/coverage/coverage-out
COVERAGE_PROFILE: /tmp/coverage/coverage.txt
steps:
- name: Download all previous coverage artifacts
- run: mkdir -p $COVERAGE_DATA $COVERAGE_OUTPUT
- name: Download all previous coverage data artifacts
uses: actions/download-artifact@v3
with:
path: ${{ runner.temp }}/coverage
path: ${{ env.COVERAGE_DATA }}
- uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- name: Merge coverages
working-directory: ${{ env.COVERAGE_DATA }}
run: |
# Create coverage directory list separate by comma
export COVERAGE_DIRS="$(ls | tr '\n' ',' | sed s/,$//)"
# Merge all coverage data directories from previous tests
go tool covdata merge -v 1 -i="$COVERAGE_DIRS" -o $COVERAGE_OUTPUT
# Print coverage percent for debug purpose if needed
echo 'coverage results:'
go tool covdata percent -i=$COVERAGE_OUTPUT
# Generate coverage profile
go tool covdata textfmt -v 1 -i=$COVERAGE_OUTPUT -o $COVERAGE_PROFILE
- name: Upload combined coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ${{ runner.temp }}/coverage
files: ${{ env.COVERAGE_PROFILE }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }}

5 changes: 3 additions & 2 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ jobs:

- name: Check go.mods
run: |
sums="$(sha256sum go.mod misc/devdeps/go.mod)"
for path in . ./misc/devdeps; do
gomods=$(find . -type f -name go.mod)
sums="$(sha256sum ${gomods})"
for path in $(dirname $(gomods)); do
env -C $path go mod tidy -v || exit 1
done
echo "$sums" | sha256sum -c
22 changes: 22 additions & 0 deletions .github/workflows/monthly-snapshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Monthly Snapshots

on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate tag name
id: tag_name
run: echo "::set-output name=tag_name::v0.0.1-dev.$(date +'%Y.%m.%d')"
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
tag_name: '${{ steps.tag_name.outputs.tag_name }}'
4 changes: 2 additions & 2 deletions .github/workflows/tm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- _test.pkg.bft
- _test.pkg.others
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 21
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
Expand All @@ -65,7 +65,7 @@ jobs:
working-directory: tm2
run: |
export GOPATH=$HOME/go
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic"
export GOTEST_FLAGS="-v -p 1 -timeout=20m -coverprofile=coverage.out -covermode=atomic"
make ${{ matrix.args }}
touch coverage.out
- uses: actions/upload-artifact@v3
Expand Down
12 changes: 12 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# man 5 gitmailmap
# git log --mailmap --pretty=short | grep ^Author: | sort -u
Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon <jae@tendermint.com>
Jae Kwon <53785+jaekwon@users.noreply.github.com> Jae Kwon <jae@gno.land>
Jae Kwon <53785+jaekwon@users.noreply.github.com> jaekwon <jae@tendermint.com>
Jae Kwon <53785+jaekwon@users.noreply.github.com> Naut Jae <naut_jae@Nauts-Mac-mini.local>
Thomas Bruyelle <thomas.bruyelle@tendermint.com> Thomas Bruyelle <thomas.bruyelle@gmail.com>
Thomas Bruyelle <thomas.bruyelle@tendermint.com> Thomas Bruyelle <thomasbruyelle@hey.com>
Miloš Živković <milos.zivkovic@tendermint.com> Miloš Živković <milos@zmilos.com>
Hariom Verma <hariom.verma@tendermint.com> Hariom Verma <hariom18599@gmail.com>
Giancarlos Salas <me@giansalex.dev> Giancarlos Salas <giansalex@gmail.com>
Morgan <morgan@morganbaz.com> Morgan <git@howl.moe>
Loading

0 comments on commit d1299e4

Please sign in to comment.