Skip to content

Smoke Tests

Smoke Tests #312

Workflow file for this run

name: Smoke Tests
on:
pull_request:
schedule:
- cron: '0 8 * * *'
workflow_dispatch:
jobs:
smoke:
name: Testnet Smoke Tests
runs-on: ubuntu-latest
timeout-minutes: 5
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
# Smoke tests shell out to `node dist/index.js` to exercise the
# compiled CLI — without a build first, that file doesn't exist
# and the `genlayer staking validators` assertion fails with
# MODULE_NOT_FOUND before it can hit the network at all.
- name: Build CLI
run: npm run build
# The staking subcommands need a keystore for the default account
# even for read-only listings (BaseAction loads the account to
# report "your stake"). Create a throwaway one with a known
# password so the subprocess test in tests/smoke.test.ts can run.
- name: Create default keystore for CLI subprocess tests
run: node dist/index.js account create --name default --password ci-smoke-test
env:
CI: true
- name: Run smoke tests
run: npm run test:smoke