Skip to content

Smoke test

Smoke test #162

Workflow file for this run

name: "Smoke test"
on:
workflow_dispatch:
inputs:
network:
description: "Cardano network to run against"
required: true
default: "preview"
type: choice
options:
- preview
- preprod
- mainnet
hydra-scripts-tx-id:
description: "TxId of already published scripts (leave empty to publish)"
required: false
jobs:
smoke-test:
name: "Smoke test on ${{inputs.network}}"
runs-on: [self-hosted, cardano]
concurrency: cardano-${{inputs.network}}
env:
state_dir: /srv/var/cardano/state-${{inputs.network}}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: ❄ Prepare nix
uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
accept-flake-config = true
- name: 🚬 Cleanup hydra-node state
run: |
rm -rf ${state_dir}/state-*
- name: 🤐 Setup secret faucet key
if: ${{ inputs.network == 'mainnet' }}
run: |
echo "${{secrets.faucet_sk}}" | base64 -d >hydra-cluster/config/credentials/faucet.sk
echo "${{secrets.faucet_vk}}" | base64 -d >hydra-cluster/config/credentials/faucet.vk
- name: 🚬 Run hydra-cluster smoke test
run: |
if [ -n "${{inputs.hydra-scripts-tx-id}}" ]; then
nix develop .#exes --command bash -c "hydra-cluster --${{inputs.network}} --hydra-scripts-tx-id ${{inputs.hydra-scripts-tx-id}} --state-directory ${state_dir}"
else
nix develop .#exes --command bash -c "hydra-cluster --${{inputs.network}} --publish-hydra-scripts --state-directory ${state_dir}"
fi
- name: 💾 Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: hydra-cluster-logs
path: ${state_dir}/logs/**/*
if-no-files-found: ignore