Skip to content

Andystaples/add functions support #11

Andystaples/add functions support

Andystaples/add functions support #11

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@v4
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: 3.14
- name: Install dependencies
working-directory: azure-functions-durable
run: |
python -m pip install --upgrade pip
pip install setuptools wheel tox
pip install flake8
- name: Run flake8 Linter
working-directory: azure-functions-durable
run: flake8 .
- name: Run flake8 Linter
working-directory: tests/azure-functions-durable
run: flake8 .
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@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install durabletask dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
- name: Install durabletask locally
run: |
pip install . --no-deps --force-reinstall
- name: Install azure-functions-durable locally
working-directory: azure-functions-durable
run: |
pip install . --no-deps --force-reinstall
- name: Run unit tests
working-directory: tests/azure-functions-durable
run: |
pytest -m "not dts and not azurite and not functions_e2e" --verbose
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.2.0b6``. That build is not yet published to PyPI, so
# this job is skipped by default. Enable it by setting the repository
# variable ``RUN_FUNCTIONS_E2E`` to ``true`` (Settings > Secrets and
# variables > Actions > Variables) once 2.2.0b6 is available on PyPI, or
# provide the library build via ``AZURE_FUNCTIONS_PYTHON_LIBRARY``.
if: ${{ vars.RUN_FUNCTIONS_E2E == 'true' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up Node.js (needed for Azurite and Functions Core Tools)
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install Azurite and Azure Functions Core Tools
run: |
npm install -g azurite
npm install -g azure-functions-core-tools@4 --unsafe-perm true
- name: Start Azurite
shell: bash
run: |
azurite --silent --location /tmp/azurite --blobPort 10000 --queuePort 10001 --tablePort 10002 &
sleep 2
- 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.
run: nox -s functions_e2e