-
Notifications
You must be signed in to change notification settings - Fork 6
84 lines (71 loc) · 2.66 KB
/
Copy pathpython-integration-tests.yml
File metadata and controls
84 lines (71 loc) · 2.66 KB
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
78
79
80
81
82
83
84
name: Python Integration Tests
on:
workflow_dispatch:
schedule:
- cron: "0 9 * * *"
permissions:
contents: read
id-token: write
jobs:
integration-tests:
name: Durable Task integration tests
runs-on: ubuntu-latest
timeout-minutes: 60
environment: integration
env:
DURABLE_TASK_SCHEDULER_CONNECTION_STRING: Endpoint=http://localhost:8080;TaskHub=default;Authentication=None
REDIS_CONNECTION_STRING: redis://localhost:6379
AzureWebJobsStorage: UseDevelopmentStorage=true
FUNCTIONS_WORKER_RUNTIME: python
FOUNDRY_PROJECT_ENDPOINT: ${{ secrets.FOUNDRY_PROJECT_ENDPOINT }}
FOUNDRY_MODEL: ${{ secrets.FOUNDRY_MODEL }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
# Core Tools 4.12.1 predates the Python 3.13 proxy-worker fix for
# monorepo-level virtual environments (azure-functions-python-worker#1833).
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Validate integration configuration
shell: bash
run: |
missing=()
for variable in \
FOUNDRY_PROJECT_ENDPOINT \
FOUNDRY_MODEL \
AZURE_CLIENT_ID \
AZURE_TENANT_ID \
AZURE_SUBSCRIPTION_ID
do
if [[ -z "${!variable}" ]]; then
missing+=("${variable}")
fi
done
if (( ${#missing[@]} )); then
echo "::error::Missing required integration configuration: ${missing[*]}"
exit 1
fi
- name: Login to Azure
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Start integration infrastructure
uses: ./.github/actions/azure-functions-integration-setup
- name: Sync workspace
working-directory: python
run: uv sync --all-packages --group dev --group test
- name: Integration tests
working-directory: python
run: uv run pytest packages/durabletask/tests/integration_tests -m integration -n 4 --dist loadscope --timeout 480
- name: Azure Functions integration tests
working-directory: python
run: uv run pytest packages/azurefunctions/tests/integration_tests -m integration -n 4 --dist loadscope --timeout 480