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

ci: validate genesis.json #3170

Merged
merged 11 commits into from
Nov 26, 2024
57 changes: 57 additions & 0 deletions .github/workflows/genesis-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: genesis-verify
ltzmaxwell marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
branches:
- master
paths:
- "misc/deployments/**/genesis.json"
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: "misc/deployments/**/genesis.json"

- name: List changed genesis files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Changed file: $file"
done
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: Install dependencies
run: go mod download
sw360cab marked this conversation as resolved.
Show resolved Hide resolved

- name: Build gnogenesis
run: make -C contribs/gnogenesis

- name: Verify each genesis file
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Verifying $file"
gnogenesis verify -genesis-path $file
done

- name: Build gnoland
run: make -C gno.land install.gnoland

- name: Running latest gnoland with each genesis file
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "Running gnoland with $file"
gnoland start -lazy=true --genesis $file
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved
mazzy89 marked this conversation as resolved.
Show resolved Hide resolved
# TODO: how to determine if the genesis is valid and chain did start?
zivkovicmilos marked this conversation as resolved.
Show resolved Hide resolved
done
Loading