-
Notifications
You must be signed in to change notification settings - Fork 64
85 lines (80 loc) · 2.82 KB
/
Copy pathvalidate.yml
File metadata and controls
85 lines (80 loc) · 2.82 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
name: Validate
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
jobs:
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Fallback path: on Python 3.9 the SDK's df_dumps / df_loads cannot
# be installed (azure-functions 2.x requires >=3.13 and the 1.26.0
# line requires >=3.10), so this leg exercises the legacy
# serialization fallback in df_serialization.
- python-version: "3.9"
functions-sdk: ""
# SDK path: Python 3.13 with the beta that first ships df_dumps /
# df_loads, exercising the SDK-delegated serialization branch.
# TODO: change to "azure-functions>=2.2.0" once 2.2.0 GA ships, and
# drop the explicit override step below.
- python-version: "3.13"
functions-sdk: "azure-functions>=2.2.0b5"
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Functions SDK override
if: matrix.functions-sdk != ''
run: pip install "${{ matrix.functions-sdk }}"
- name: Run Linter
# Lint only on the canonical Python version. On Python 3.12+, PEP 701
# changed f-string tokenization so pycodestyle inspects tokens inside
# f-strings, producing false positives (e.g. the ':' in 'http://' or
# the indentation of multi-line f-string concatenations). Linting is
# environment-agnostic, so running it once on 3.9 is sufficient.
if: matrix.python-version == '3.9'
run: |
cd azure
flake8 . --count --show-source --statistics
- name: Run tests
run: |
pytest --ignore=samples-v2
test-samples:
strategy:
matrix:
app_name: [blueprint, fan_in_fan_out, function_chaining]
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./samples-v2/${{ matrix.app_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r ../../requirements.txt
pip install ../.. --no-cache-dir --upgrade --no-deps --force-reinstall
- name: Run tests
run: |
python -m pytest