-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (44 loc) · 1.39 KB
/
run-scheduled.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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 }}