Skip to content

Supernova

Supernova #594

Workflow file for this run

name: Supernova
on:
push:
branches:
- ci/supernova
schedule:
- cron: "0 2 * * *" # run at 2 AM UTC
workflow_dispatch:
jobs:
supernova:
runs-on: ubuntu-latest
permissions:
contents: write
services:
gnoland:
image: ghcr.io/gnolang/gno/gnoland:nightly
# keep the container running
options: --workdir /gnoroot -it --entrypoint "sh"
ports:
- 26657:26657
- 36657:36657
steps:
- uses: actions/checkout@v3
- name: setup and start gnoland chain
run: |
docker exec ${{ job.services.gnoland.id }} gnoland config init
docker exec ${{ job.services.gnoland.id }} sed -i 's#laddr =.*:26657.*#laddr = "tcp://0.0.0.0:26657"#g' gnoland-data/config/config.toml
docker exec ${{ job.services.gnoland.id }} sed -i 's#skip_timeout_commit = false#skip_timeout_commit = true#g' gnoland-data/config/config.toml
docker exec -dit ${{ job.services.gnoland.id }} gnoland start -lazy
- name: download supernova
run: |
rm -rf /tmp/main.zip /tmp/supernova-main
export SUPERNOVA_VERSION=1.3.1
wget -c https://github.com/gnolang/supernova/releases/download/v${SUPERNOVA_VERSION}/supernova_${SUPERNOVA_VERSION}_linux_amd64.tar.gz -O - | tar -xz -C /tmp
- name: wait Gno to be ready (sleep)
run: |
sleep 20
- name: run supernova
run: |
curl -v http://127.0.0.1:26657/status
/tmp/supernova -sub-accounts 10 -transactions 1000 -url http://127.0.0.1:26657 -mnemonic "source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast" -output result.json > /dev/null 2>&1
- name: archive supernova result
uses: actions/upload-artifact@v3
with:
name: supernova-result.json
path: result.json
- name: Send report to slack \#gno-core-tech
run: |
DATA=$(cat result.json | jq -r )
PAYLOAD="{\"payload\": '$DATA'}"
curl -X POST -H 'Content-type: application/json' --data "$PAYLOAD" $SLACK_WEBHOOK_URL
env:
SLACK_WEBHOOK_URL: ${{ secrets.CI_REPORT_SLACK_WEBHOOK }}
- name: move result.json in reports/
run: |
mkdir -p reports/supernova
mv result.json reports/supernova/$(date +"%Y-%m-%d")_report.json
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: add daily report