Skip to content

Test cardano-node

Test cardano-node #684

Workflow file for this run

name: "Test cardano-node"
env:
TESTNET: "cardano_node_master"
REGISTRY: ghcr.io/cardano-foundation/antithesis
EMAILS: '[email protected]'
DURATION: 300 # in minutes
on:
# can be dispatched manually
workflow_dispatch:
inputs:
test:
description: 'Test configuration to run (a directory in compose/testnets)'
required: true
default: cardano_node_master
type: string
duration:
description: 'Test duration (in hours)'
required: false
default: 5
type: number
schedule:
# run every 6 hours
- cron: '5 1,7,13,19 * * *'
jobs:
run-cardano-node:
runs-on: ubuntu-latest
# required permissions to be able to push to registry
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: 🚧 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: πŸ“₯ Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref_name || '' }}
- name: πŸ”‘ Login Docker Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: πŸ— Publish config image
working-directory: compose
run: |
make publish-test-config-image testnet=${{ inputs.test || env.TESTNET }} registry=${{ env.REGISTRY }}
# this is where we should send a request on-chain
# for now we use the GHA provided by AT
- name: πŸƒ Trigger Antithesis
uses: antithesishq/[email protected]
with:
notebook_name: cardano
tenant: cardano
username: ${{ secrets.ANTITHESIS_USERNAME }}
password: ${{ secrets.ANTITHESIS_PASSWORD }}
github_token: ${{ secrets.GH_PAT }}
images: ghcr.io/intersectmbo/cardano-node:latest;${{ env.REGISTRY }}/sidecar:latest;${{ env.REGISTRY }}/tracer:latest;${{ env.REGISTRY }}/tracer-sidecar:latest;${{ env.REGISTRY }}/configurator:latest
config_image: ${{ env.REGISTRY }}/config:latest
description: "Run ${{ inputs.test || env.TESTNET }}"
email_recipients: ${{ env.EMAILS }}
test_name: "${{ inputs.test || env.TESTNET }}"
additional_parameters: |-
antithesis.duration=${{ inputs.duration || env.DURATION }}