Skip to content

feat(gnovm): make string→slice conversion capacity deterministic #21976

feat(gnovm): make string→slice conversion capacity deterministic

feat(gnovm): make string→slice conversion capacity deterministic #21976

Workflow file for this run

name: Gno Examples
on:
push:
branches:
- master
pull_request:
paths:
# any change to gnovm code can make examples fail
- gnovm/**
- examples/**
workflow_dispatch:
inputs:
debug:
description: Enable debug mode for gno test
required: false
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
gno2go:
strategy:
fail-fast: false
matrix:
goversion:
- "1.23.x"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goversion }}
- run: go install -v ./gnovm/cmd/gno
- run: go run ./gnovm/cmd/gno tool transpile -v --gobuild ./examples
test:
name: Run gno test
uses: ./.github/workflows/template_gnotest.yml
with:
debug: ${{ inputs.debug || false }}
path: "examples"
go-version: "1.23.x"
lint:
name: Run gno lint
uses: ./.github/workflows/template_gnolint.yml
with:
path: "examples"
go-version: "1.23.x"
# TODO: consider running lint on every other directories, maybe in "warning" mode?
# TODO: track coverage
fmt:
name: Run gno fmt on examples
uses: ./.github/workflows/template_gnofmt.yml
with:
path: "examples"
generate:
name: Check generated files are up to date
uses: ./.github/workflows/template_build.yml
with:
modulepath: "examples"
go-version: "1.23.x"
mod-tidy:
strategy:
fail-fast: false
matrix:
go-version: ["1.23.x"]
# unittests: TODO: matrix with contracts
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v5
- working-directory: ./examples
run: |
make tidy
# Check if there are changes after running gno mod tidy
git diff --exit-code || (echo "Some gnomod.toml files are not tidy, please run 'make tidy'." && exit 1)