File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 inputs :
2121 versionSpec : $(PYTHON_VERSION)
2222 - bash : |
23+ VERSION=$(python -c "import re; content = open('azure/functions/__init__.py').read(); match = re.search(r\"__version__ = '(\d+)\.(\d+)\.(\d+).*'\", content); print(match.group(1)) if match else '1'")
24+ echo "##vso[task.setvariable variable=MAJOR_VERSION]$VERSION"
25+ displayName: 'Detect package version'
26+ - bash : |
27+ PYTHON_MAJOR=$(echo $(PYTHON_VERSION) | cut -d. -f1)
28+ PYTHON_MINOR=$(echo $(PYTHON_VERSION) | cut -d. -f2)
29+
30+ if [ "$MAJOR_VERSION" == "2" ] && [ "$PYTHON_MINOR" -lt "13" ]; then
31+ echo "Skipping tests for Python $PYTHON_VERSION on package version 2.x (requires Python 3.13+)"
32+ exit 0
33+ fi
34+
2335 python -m pip install --upgrade pip
2436 python -m pip install -U -e .[dev]
2537 displayName: 'Install dependencies'
38+ condition: succeededOrFailed()
2639 - bash : |
40+ PYTHON_MAJOR=$(echo $(PYTHON_VERSION) | cut -d. -f1)
41+ PYTHON_MINOR=$(echo $(PYTHON_VERSION) | cut -d. -f2)
42+
43+ if [ "$MAJOR_VERSION" == "2" ] && [ "$PYTHON_MINOR" -lt "13" ]; then
44+ echo "Skipping tests for Python $PYTHON_VERSION on package version 2.x (requires Python 3.13+)"
45+ exit 0
46+ fi
47+
2748 python -m pytest --cache-clear --cov=./azure --cov-report=xml --cov-branch tests
28- displayName: 'Test with pytest'
49+ displayName: 'Test with pytest'
50+ condition: succeededOrFailed()
You can’t perform that action at this time.
0 commit comments