-
Notifications
You must be signed in to change notification settings - Fork 906
77 lines (60 loc) · 2.37 KB
/
sdk-cli-perf-monitor-test.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# execute tests in src/promptflow/tests/sdk_cli_azure_test, src/promptflow/tests/sdk_cli_test with mark perf_monitor_test
name: sdk-cli-perf-monitor-test
on:
pull_request:
paths:
- src/promptflow/**
- scripts/building/**
- .github/workflows/sdk-cli-perf-monitor-test.yml
schedule:
- cron: "0 */6 * * *" # Run every 6 hours
workflow_dispatch:
env:
packageSetupType: promptflow_with_extra
testWorkingDirectory: ${{ github.workspace }}/src/promptflow
PYTHONPATH: ${{ github.workspace }}/src/promptflow
IS_IN_CI_PIPELINE: "true"
PROMPT_FLOW_TEST_MODE: "replay"
jobs:
sdk_cli_perf_monitor_test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Set Github Run Id to an Environment Variable
run: echo "GITHUB_RUN_ID=${{ github.run_id }}" >> $GITHUB_ENV
- name: Print Github Run Id
run: echo "Github Run Id is GITHUB_RUN_ID"
- name: Display and Set Environment Variables
run: |
export pyVersion="3.9";
env | sort >> $GITHUB_OUTPUT
id: display_env
shell: bash -el {0}
- name: Python Setup - ${{ matrix.os }} - Python Version ${{ steps.display_env.outputs.pyVersion }}
uses: "./.github/actions/step_create_python_environment"
with:
pythonVersion: ${{ steps.display_env.outputs.pyVersion }}
- name: Build wheel
uses: "./.github/actions/step_sdk_setup"
with:
setupType: ${{ env.packageSetupType }}
scriptPath: ${{ env.testWorkingDirectory }}
- name: Generate (mock) connections.json
shell: pwsh
working-directory: ${{ env.testWorkingDirectory }}
run: cp ${{ github.workspace }}/src/promptflow/dev-connections.json.example ${{ github.workspace }}/src/promptflow/connections.json
- name: Run Test
shell: pwsh
working-directory: ${{ env.testWorkingDirectory }}
run: |
gci env:* | sort-object name
python "../../scripts/building/run_coverage_tests.py" `
-p promptflow `
-t ${{ github.workspace }}/src/promptflow/tests/sdk_cli_azure_test ${{ github.workspace }}/src/promptflow/tests/sdk_cli_test `
-l eastus `
-m "perf_monitor_test"