Skip to content

Run scheduled test #236

Run scheduled test

Run scheduled test #236

Workflow file for this run

name: Run scheduled test
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
concurrency:
group: "scheduled-test"
cancel-in-progress: false
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"
test_configs="$(cat $tests_file | yq -o json | jq '.tests' | jq -c 'map(select(.schedule == true))')"
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) }}
send_notification: "true"
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 }}