-
Notifications
You must be signed in to change notification settings - Fork 31
114 lines (100 loc) · 3.9 KB
/
Copy pathdurabletask-azurefunctions.yml
File metadata and controls
114 lines (100 loc) · 3.9 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Durable Task Scheduler SDK (azure-functions-durable)
on:
push:
branches:
- "main"
tags:
- "azurefunctions-v*" # Only run for tags starting with "azurefunctions-v"
pull_request:
branches:
- "main"
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.13
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: 3.13
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nox
- name: Run lint checks
run: nox -s lint
run-tests:
strategy:
fail-fast: false
matrix:
python-version: ["3.13", "3.14"]
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Nox
run: |
python -m pip install --upgrade pip
pip install nox
- name: Run unit tests
run: nox -s functions_unit-${{ matrix.python-version }}
e2e-tests:
needs: run-tests
runs-on: ubuntu-latest
# The end-to-end suite launches a real Azure Functions host, which requires
# ``azure-functions>=2.3.0b2``. That build is published to PyPI and pulled
# in as a declared dependency of ``azure-functions-durable``.
# Run the suite in both payload-typing modes: the default (loose) codec and
# strict typing (``AZURE_FUNCTIONS_DURABLE_STRICT_TYPING=1``), which requires
# every decode call site to supply the destination type. ``0`` is not a
# truthy value for the flag, so it selects loose mode.
strategy:
fail-fast: false
matrix:
strict-typing: ["0", "1"]
name: e2e-tests (strict-typing=${{ matrix.strict-typing }})
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up Python 3.13
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
- name: Set up Node.js (needed for Azurite and Functions Core Tools)
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22.x"
- name: Install Azurite and Azure Functions Core Tools
run: |
npm install -g azurite@latest
npm install -g azure-functions-core-tools@4 --unsafe-perm true
- name: Install nox
run: |
python -m pip install --upgrade pip
pip install nox
- name: Run end-to-end tests
# nox provisions each sample app's in-app virtual environment (a link to
# a single editable install) so the Functions worker loads our
# grpc/protobuf rather than its bundled copies.
env:
AZURE_FUNCTIONS_DURABLE_STRICT_TYPING: ${{ matrix.strict-typing }}
run: nox -s functions_e2e
# The harness captures each sample app's ``func start`` stdout/stderr to
# ``<app>/_func_host.log``. On failure that log holds the real host/worker
# error (durable extension load, storage wiring, worker crash) that the
# pytest summary does not surface, so upload it for diagnosis.
- name: Upload Functions host logs
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: func-host-logs-strict-${{ matrix.strict-typing }}
path: tests/azure-functions-durable/e2e/apps/*/_func_host.log
if-no-files-found: warn
retention-days: 7