Skip to content

Supernova

Supernova #537

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: [self-hosted, Linux, X64, benchmark-v1]
permissions:
contents: write
services:
gnoland:
image: ghcr.io/gnolang/gno:latest
# keep the container running
options: --workdir /opt/gno/src/gno.land -it --entrypoint "bash"
ports:
- 26657:26657
- 36657:36657
steps:
- uses: actions/checkout@v3
- name: setup and start gnoland chain
run: |
docker exec ${{ job.services.gnoland.id }} gnoland start -skip-start=true
docker exec ${{ job.services.gnoland.id }} sed -i 's#laddr =.*:26657.*#laddr = "tcp://0.0.0.0:26657"#g' testdir/config/config.toml
docker exec ${{ job.services.gnoland.id }} sed -i 's#skip_timeout_commit = false#skip_timeout_commit = true#g' testdir/config/config.toml
docker exec -dit ${{ job.services.gnoland.id }} gnoland start
- name: download supernova
run: |
rm -rf /tmp/main.zip /tmp/supernova-main
export SUPERNOVA_VERSION=1.0.0
wget -c https://github.com/gnolang/supernova/releases/download/v${SUPERNOVA_VERSION}/supernova_${SUPERNOVA_VERSION}_linux_amd64.tar.gz -O - | tar -xz -C /tmp
# install supernova scripts
wget -O /tmp/main.zip https://github.com/gnolang/supernova/archive/refs/heads/main.zip
unzip -d /tmp/ /tmp/main.zip
cp -r /tmp/supernova-main/scripts .
- name: run supernova
run: |
sleep 10
curl -v http://localhost:26657/status
/tmp/supernova -sub-accounts 10 -transactions 1000 -url http://localhost: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
- 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