Skip to content

testoperator dispatch #374

testoperator dispatch

testoperator dispatch #374

name: testoperator dispatch
on:
schedule:
# Every day, at 0900 UTC (0200 PDT)
- cron: '0 9 * * *'
workflow_dispatch:
inputs:
spiced_commit:
description: 'An optional commit hash to use for spiced'
required: false
type: string
workflow_type:
description: 'the workflow to execute (bench, throughput, load, etc)'
required: true
default: 'bench'
type: choice
options:
- 'bench'
- 'load'
- 'throughput'
- 'append'
- 'http-consistency'
- 'nas'
- 'text-to-sql'
- 'streaming-bench'
- 'streaming-correctness'
update_snapshots:
description: 'Update snapshots?'
required: false
type: boolean
default: false
scheduled:
description: 'Run schedule?'
required: false
type: boolean
default: false
jobs:
dispatch-scheduled:
name: Dispatch tests - Scheduled
runs-on: spiceai-dev-runners
if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.scheduled == 'true') }}
strategy:
fail-fast: false
matrix:
branch:
- 'trunk'
- 'release/2.0'
concurrency:
group: testoperator-dispatch-scheduled
cancel-in-progress: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
ref: ${{ matrix.branch }}
- name: Install MinIO
uses: ./.github/actions/setup-minio
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
minio_access_key: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Setup spiced
uses: ./.github/actions/setup-spiced
id: setup-spiced
with:
ref: refs/heads/${{ matrix.branch }}
- name: Display spiced commit
run: echo "SPICED_COMMIT=${{ steps.setup-spiced.outputs.SPICED_COMMIT }}"
- name: Build Testoperator
uses: ./.github/actions/build-testoperator
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
minio_access_key: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Build spicepod validator
id: build-spicepod-validator
uses: ./.github/actions/build-spicepod-validator
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
minio_access_key: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Set spicepod validator path
run: echo "SPICEPOD_VALIDATOR=${{ steps.build-spicepod-validator.outputs.validator-path }}" >> $GITHUB_ENV
- name: Validate spicepods - TPCH - SF1
run: |
for file in ./test/spicepods/tpch/sf1/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Validate spicepods - TPCDS - SF1
run: |
for file in ./test/spicepods/tpcds/sf1/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Validate spicepods - ClickBench - SF1
run: |
for file in ./test/spicepods/clickbench/sf1/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Validate spicepods - TPCH - SF100
run: |
for file in ./test/spicepods/tpch/sf100/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Dispatch Testoperator - Scheduled Bench - TPCH - SF1
run: |
testoperator dispatch ./tools/testoperator/dispatch/tpch/sf1 --workflow bench
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ matrix.branch }}
- name: Dispatch Testoperator - Scheduled Bench - TPCDS
run: |
testoperator dispatch ./tools/testoperator/dispatch/tpcds/sf1 --workflow bench
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ matrix.branch }}
- name: Dispatch Testoperator - Scheduled Bench - ClickBench
run: |
testoperator dispatch ./tools/testoperator/dispatch/clickbench/sf1 --workflow bench
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ matrix.branch }}
- name: Dispatch Testoperator - Scheduled Append - TPCH - SF1
run: |
testoperator dispatch ./tools/testoperator/dispatch/tpch/sf1 --workflow append
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ matrix.branch }}
- name: Dispatch Testoperator - Scheduled Bench - TPCH - SF100
run: |
testoperator dispatch ./tools/testoperator/dispatch/tpch/sf100 --workflow bench
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ matrix.branch }}
- name: Dispatch Testoperator - Scheduled Streaming - Bench
run: |
testoperator dispatch ./tools/testoperator/dispatch/streaming --workflow streaming-bench
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ matrix.branch }}
- name: Dispatch Testoperator - Scheduled Streaming - Correctness
run: |
testoperator dispatch ./tools/testoperator/dispatch/streaming --workflow streaming-correctness
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ matrix.branch }}
dispatch-input:
name: Dispatch tests - Input
runs-on: spiceai-dev-runners
if: ${{ github.event_name == 'workflow_dispatch' }}
concurrency:
group: testoperator-dispatch-${{ github.event.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Install MinIO
uses: ./.github/actions/setup-minio
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
minio_access_key: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Setup spiced
uses: ./.github/actions/setup-spiced
id: setup-spiced
with:
spiced_commit: ${{ github.event.inputs.spiced_commit }}
ref: ${{ github.event.ref }}
- name: Display spiced commit
run: echo "SPICED_COMMIT=${{ steps.setup-spiced.outputs.SPICED_COMMIT }}"
- name: Build Testoperator
uses: ./.github/actions/build-testoperator
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
minio_access_key: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Build spicepod validator
id: build-spicepod-validator
uses: ./.github/actions/build-spicepod-validator
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
minio_access_key: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
minio_secret_key: ${{ secrets.TEST_MINIO_SECRET_KEY }}
- name: Set spicepod validator path
run: echo "SPICEPOD_VALIDATOR=${{ steps.build-spicepod-validator.outputs.validator-path }}" >> $GITHUB_ENV
- name: Validate spicepods - TPCH - SF1
run: |
for file in ./test/spicepods/tpch/sf1/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Validate spicepods - TPCDS - SF1
run: |
for file in ./test/spicepods/tpcds/sf1/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Validate spicepods - ClickBench - SF1
run: |
for file in ./test/spicepods/clickbench/sf1/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Validate spicepods - TPCH - SF100
run: |
for file in ./test/spicepods/tpch/sf100/**/*.yaml; do
echo "Validating $file"
"$SPICEPOD_VALIDATOR" "$file"
done
- name: Dispatch Testoperator - ${{ github.event.inputs.workflow_type }} - TPCH - SF1
run: |
testoperator dispatch ./tools/testoperator/dispatch/tpch/sf1 \
--workflow ${{ github.event.inputs.workflow_type }} \
--update-snapshots ${{ github.event.inputs.update_snapshots }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ github.event.ref }}
- name: Dispatch Testoperator - ${{ github.event.inputs.workflow_type }} - TPCDS
run: |
testoperator dispatch ./tools/testoperator/dispatch/tpcds/sf1 \
--workflow ${{ github.event.inputs.workflow_type }} \
--update-snapshots ${{ github.event.inputs.update_snapshots }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ github.event.ref }}
- name: Dispatch Testoperator - ${{ github.event.inputs.workflow_type }} - ClickBench
run: |
testoperator dispatch ./tools/testoperator/dispatch/clickbench/sf1 \
--workflow ${{ github.event.inputs.workflow_type }} \
--update-snapshots ${{ github.event.inputs.update_snapshots }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ github.event.ref }}
- name: Dispatch Testoperator - ${{ github.event.inputs.workflow_type }} - TPCH - SF100
run: |
testoperator dispatch ./tools/testoperator/dispatch/tpch/sf100 \
--workflow ${{ github.event.inputs.workflow_type }} \
--update-snapshots ${{ github.event.inputs.update_snapshots }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ github.event.ref }}
- name: Dispatch Testoperator - ${{ github.event.inputs.workflow_type }} - Text to SQL
run: |
testoperator dispatch ./tools/testoperator/dispatch/text_to_sql \
--workflow ${{ github.event.inputs.workflow_type }} \
--update-snapshots ${{ github.event.inputs.update_snapshots }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ github.event.ref }}
- name: Dispatch Testoperator - ${{ github.event.inputs.workflow_type }} - Streaming
run: |
testoperator dispatch ./tools/testoperator/dispatch/streaming \
--workflow ${{ github.event.inputs.workflow_type }} \
--update-snapshots ${{ github.event.inputs.update_snapshots }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SPICED_COMMIT: ${{ steps.setup-spiced.outputs.SPICED_COMMIT }}
WORKFLOW_COMMIT: ${{ github.event.ref }}