Node sync tests #89
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node sync tests | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: "Environment on which Buildkite agent will run tests" | |
type: choice | |
options: | |
- mainnet | |
- preprod | |
- preview | |
- shelley-qa | |
default: mainnet | |
tag_no1: | |
description: "Initial sync - Graph axis label" | |
required: true | |
default: "10.2" | |
node_rev1: | |
description: "Initial sync - cardano-node revision" | |
required: true | |
default: "9017d918d0c5143a137a82d94af4a2ac67ae7d2e" | |
node_topology1: | |
description: "Initial sync - cardano-node topology" | |
type: choice | |
options: | |
- non-bootstrap-peers | |
- bootstrap-peers | |
default: legacy | |
use_genesis_mode: | |
description: "Use Ouroboros Genesis mode" | |
type: boolean | |
default: false | |
buildkite_pipeline: | |
description: "Buildkite pipeline to use" | |
type: choice | |
options: | |
- core-tech-bench | |
- core-tech-bench-af | |
- core-tech-bench-ap | |
- core-tech-bench-eu | |
- core-tech-bench-sa | |
buildkite_queue_name: | |
description: "Buildkite queue name to use" | |
type: choice | |
options: | |
- node-sync-tests | |
- node-sync-tests-genesis-af | |
jobs: | |
node_sync_test_buildkite_mainnet: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest node tag | |
id: get_tag | |
shell: bash | |
run: | | |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
echo "Using manual input for tag_no1" | |
echo "node_rev1=${{ github.event.inputs.node_rev1 }}" >> $GITHUB_OUTPUT | |
else | |
echo "Fetching latest tag for scheduled run" | |
# Fetch the latest tag dynamically | |
node_release_url='https://api.github.com/repos/IntersectMBO/cardano-node/releases/latest' | |
latest_tag=$(curl -s $node_release_url | jq .tag_name -r) | |
echo "node_rev1=$latest_tag" >> $GITHUB_OUTPUT | |
# Fetch more details | |
latest_name=$(curl -s $node_release_url | jq .name -r) | |
latest_url=$(curl -s $node_release_url | jq .html_url -r) | |
latest_archive=$(curl -s $node_release_url | jq .assets[0].browser_download_url -r) | |
echo "Latest Release Name: $latest_name" | |
echo "Release URL: $latest_url" | |
echo "Download Archive URL: $latest_archive" | |
fi | |
- name: Trigger the Buildkite pipeline - run sync tests on Mainnet | |
uses: 'buildkite/[email protected]' | |
env: | |
BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }} | |
PIPELINE: "${{ github.event.inputs.buildkite_pipeline }}" | |
BRANCH: ${{ github.ref_name }} | |
MESSAGE: ':github: Triggered by GitHub Action' | |
AWS_DB_USERNAME: ${{ secrets.AWS_DB_USERNAME }} | |
AWS_DB_PASS: ${{ secrets.AWS_DB_PASS }} | |
AWS_DB_NAME: ${{ secrets.AWS_DB_NAME }} | |
AWS_DB_HOSTNAME: ${{ secrets.AWS_DB_HOSTNAME }} | |
BLOCKFROST_API_KEY: ${{ secrets.BLOCKFROST_API_KEY }} | |
BUILD_ENV_VARS: '{ | |
"env":"${{ github.event.inputs.environment }}", | |
"node_rev1":"${{ steps.get_tag.outputs.node_rev1 }}", | |
"node_rev2":"${{ github.event.inputs.node_rev2 }}", | |
"tag_no1":"${{ github.event.inputs.tag_no1 }}", | |
"tag_no2":"${{ github.event.inputs.tag_no2 }}", | |
"node_topology1":"${{ github.event.inputs.node_topology1 }}", | |
"node_topology2":"${{ github.event.inputs.node_topology2 }}", | |
"node_start_arguments1":"None", | |
"node_start_arguments2":"None", | |
"use_genesis_mode":"${{ github.event.inputs.use_genesis_mode }}", | |
"queue_name":"${{ github.event.inputs.buildkite_queue_name }}", | |
"CARDANO_NODE_SOCKET_PATH":"/var/tmp/${{ github.event.inputs.buildkite_pipeline }}/node.socket", | |
"BLOCKFROST_API_KEY":"${{ secrets.BLOCKFROST_API_KEY }}", | |
"AWS_DB_USERNAME":"${{ secrets.AWS_DB_USERNAME }}", | |
"AWS_DB_PASS":"${{ secrets.AWS_DB_PASS }}", | |
"AWS_DB_NAME":"${{ secrets.AWS_DB_NAME }}", | |
"AWS_DB_HOSTNAME":"${{ secrets.AWS_DB_HOSTNAME }}" | |
}' |