Skip to content

Commit

Permalink
feat(ci): add gnodev test to ci
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
  • Loading branch information
gfanton committed Feb 19, 2024
1 parent 35a747f commit fb20913
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,23 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- run: make install ${{ matrix.program }}
- run: make install.${{ matrix.program }}
working-directory: contribs

test:
strategy:
fail-fast: false
matrix:
goversion: # two latest versions
- "1.21.x"
program:
- "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 test.${{ matrix.program }}
working-directory: contribs
7 changes: 4 additions & 3 deletions contribs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ help:
.PHONY: install
install: install.gnomd install.gnodev

install.gnomd:; cd gnomd && go install .
install.gnomd:; $(MAKE) -C ./gnomod install
install.gnodev:; $(MAKE) -C ./gnodev install

.PHONY: clean
Expand Down Expand Up @@ -36,5 +36,6 @@ tidy:
GOTEST_FLAGS ?= -v -p 1 -timeout=30m

.PHONY: test
test:
@echo "nothing to do."
test: test.gnodev
test.gnodev:
$(MAKE) -C ./gnodev test
6 changes: 5 additions & 1 deletion contribs/gnodev/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
GNOROOT_DIR ?= $(abspath $(lastword $(MAKEFILE_LIST))/../../../)

GOBUILD_FLAGS := -ldflags "-X github.com/gnolang/gno/gnovm/pkg/gnoenv._GNOROOT=$(GNOROOT_DIR)"
GOTEST_FLAGS ?= $(GOBUILD_FLAGS) -v -p 1 -timeout=5m

install:
go install $(GOBUILD_FLAGS) .

build:
go build $(GOBUILD_FLAGS) -o build/gnodev ./cmd/gno
go build $(GOBUILD_FLAGS) -o build/gnodev .

test:
go test $(GOTEST_FLAGS) -v ./...

0 comments on commit fb20913

Please sign in to comment.