Skip to content

Run manual test

Run manual test #217

Workflow file for this run

name: Run manual test
on:
workflow_dispatch:
inputs:
overrideTests:
description: 'Test IDs to run (eg. test1,test2)'
default: ""
type: string
overrideClientPairs:
description: 'Override client pairs to run this test with (eg. lighthouse-get,teku-besu)'
default: ""
type: string
overrideKurtosisConfig:
description: 'Override kurtosis config to run this test with (eg. kurtosis-config/default.yaml)'
default: ""
type: string
overrideKurtosisBranch:
description: 'Override kurtosis ethereum package branch to run this test with (eg. main)'
default: ""
type: string
jobs:
get_tests:
name: "Load Tests"
runs-on: ubuntu-latest
outputs:
test_configs: ${{ steps.tests.outputs.test_configs }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: "Load test configurations from tests.yaml"
id: tests
shell: bash
run: |
tests_file="tests.yaml"
override_tests="${{ inputs.overrideTests }}"
override_pairs="${{ inputs.overrideClientPairs }}"
override_kurtosis_config="${{ inputs.overrideKurtosisConfig }}"
override_kurtosis_branch="${{ inputs.overrideKurtosisBranch }}"
test_configs="$(cat $tests_file | yq -o json | jq -c '.tests')"
if [ -z "$override_tests" ]; then
test_configs="$(echo "$test_configs" | jq -c "map(select(.schedule == true))")"
else
# filter by tests
filter_str=""
while read test; do
if ! [ -z "$filter_str" ]; then
filter_str="$filter_str or"
fi
filter_str="$filter_str .id == \"$test\""
done <<< $(echo "$override_tests" | tr "," "\n")
test_configs="$(echo "$test_configs" | jq -c "map(select($filter_str))")"
fi
if ! [ -z "$override_pairs" ]; then
test_configs="$(echo "$test_configs" | jq -c "(.[]).clientPairs |= [\"$override_pairs\"]")"
fi
if ! [ -z "$override_kurtosis_config" ]; then
test_configs="$(echo "$test_configs" | jq -c "(.[]).kurtosis = \"$override_kurtosis_config\"")"
fi
if ! [ -z "$override_kurtosis_branch" ]; then
test_configs="$(echo "$test_configs" | jq -c "(.[]).kurtosis_branch = \"$override_kurtosis_branch\"")"
fi
echo "test_configs<<EOF" >> $GITHUB_OUTPUT
echo "$test_configs" >> $GITHUB_OUTPUT
echo "$(echo "$test_configs" | jq)"
echo "EOF" >> $GITHUB_OUTPUT
run_tests:
needs: get_tests
uses: ./.github/workflows/_shared-run.yaml
name: "${{ matrix.config.name }}"
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.get_tests.outputs.test_configs) }}
with:
config: ${{ toJSON(matrix.config) }}
#use_chatgpt: '{"url": "${{ vars.CHATGPT_URL }}", "model": "${{ vars.CHATGPT_MODEL }}"}'
secrets:
RANCHER_URL: ${{ secrets.RANCHER_URL }}
RANCHER_TOKEN: ${{ secrets.RANCHER_TOKEN }}
DISCORD_HOOK: ${{ secrets.DISCORD_WEBHOOK }}
CHATGPT_KEY: ${{ secrets.CHATGPT_KEY }}