Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cleanup makefile and lock gno dependencies #164

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: 2
updates:
- package-ecosystem: "gomod"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add dependabot groups?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how gno will be updated as a dependency, since we don't do releases yet 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't know it was not working on pseudo-release, I will remove dependabot for now

directory: "/"
schedule:
interval: "daily"
target-branch: "main"
versioning-strategy: "lockfile-only"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewers:
- 'zivkovicmilos'
- package-ecosystem: npm
directory: /
target-branch: 'main'
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
workflow_call:
workflow_dispatch:

jobs:
generate:
name: Check for generate changes
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- run: yarn install --frozen-lockfile

- name: Run Generate
run: yarn generate

- name: Check for any changes
id: git-check
run: |
git diff --exit-code > /dev/null && exit 0
echo "change detected after generate"
git diff HEAD
exit 1
shell: bash
5 changes: 4 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ on:
jobs:
test:
name: Gno Test
uses: ./.github/workflows/test.yaml
uses: ./.github/workflows/test.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused how we didn't have this CI before 🤦‍♂️

generate:
name: Generate
uses: ./.github/workflows/generate.yaml
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ jobs:
os: [ "ubuntu-latest" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: tests
shell: bash
run: make
run: make test

22 changes: 10 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
EXAMPLES_DIR = src/tutorials/*/*/*
gnobin := go run github.com/gnolang/gno/gnovm/cmd/gno

all: clean clone bin test
all: generate build

clone:
cd gnobuild && git clone https://github.com/gnolang/gno.git
bin:
cd gnobuild/gno/gnovm && make build
test:
$(gnobin) test -v ./src/tutorials/...

test: $(EXAMPLES_DIR)
@echo "++++ Executing tests for $^"
./gnobuild/gno/gnovm/build/gno test -v --root-dir ./gnobuild/gno ./$^
dev build generate: node_modules
yarn run $@

clean:
rm -rf gnobuild
mkdir gnobuild
node_modules: package.json yarn.lock
yarn

.PHONY: dev build generate test all
44 changes: 44 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module gno-by-example

go 1.21

require github.com/gnolang/gno v0.0.0-20240425162424-0ba95bf33b23

require (
github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/gnolang/overflow v0.0.0-20170615021017-4d914c927216 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/peterbourgon/ff/v3 v3.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.9.0 // indirect
go.opentelemetry.io/otel v1.25.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.25.0 // indirect
go.opentelemetry.io/otel/metric v1.25.0 // indirect
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.25.0 // indirect
go.opentelemetry.io/otel/trace v1.25.0 // indirect
go.opentelemetry.io/proto/otlp v1.1.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/grpc v1.63.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
204 changes: 204 additions & 0 deletions go.sum

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions godeps.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package deps

import (
_ "github.com/gnolang/gno/gnovm/cmd/gno"
)

Loading