Skip to content

Commit 5444e63

Browse files
hallvictoriaVictoria Hall
andauthored
test: dev library testing based on branch name or variable (#1538)
* added or condition * updated condition * updated condition * easier readability * script for installing deps, test setup * typo, deleted old scripts * grant execute permissions * revert worker config * delete install deps script * re-added isntall-deps script --------- Co-authored-by: Victoria Hall <[email protected]>
1 parent 80d83cc commit 5444e63

12 files changed

+54
-66
lines changed

.github/Scripts/deferred-bindings-e2e-tests.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/Scripts/e2e-tests.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/Scripts/fwpc-e2e-tests.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

eng/ci/integration-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ variables:
2929
- template: /ci/variables/build.yml@eng
3030
- template: /ci/variables/cfs.yml@eng
3131
- group: python-integration-resources
32+
- name: isSdkRelease
33+
value: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/sdk/')]
34+
- name: isExtensionsRelease
35+
value: $[startsWith(variables['Build.SourceBranch'], 'refs/heads/extensions/')]
3236

3337
extends:
3438
template: v1/1ES.Unofficial.PipelineTemplate.yml@1es

eng/scripts/install-dependencies.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
python -m pip install --upgrade pip
4+
python -m pip install -U azure-functions --pre
5+
python -m pip install -U -e .[dev]
6+
7+
if [[ $1 != "3.7" ]]; then
8+
python -m pip install --pre -U -e .[test-http-v2]
9+
fi
10+
if [[ $1 != "3.7" && $1 != "3.8" ]]; then
11+
python -m pip install --pre -U -e .[test-deferred-bindings]
12+
fi

eng/scripts/test-setup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
cd tests
4+
python -m invoke -c test_setup build-protos
5+
python -m invoke -c test_setup webhost --branch-name=dev
6+
python -m invoke -c test_setup extensions

eng/templates/jobs/ci-unit-tests.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,13 @@ jobs:
2626
inputs:
2727
version: 8.0.x
2828
- bash: |
29-
python -m pip install --upgrade pip
30-
python -m pip install -U azure-functions --pre
31-
python -m pip install -U -e .[dev]
32-
33-
if [[ $(PYTHON_VERSION) != "3.7" ]]; then
34-
python -m pip install --pre -U -e .[test-http-v2]
35-
fi
36-
37-
cd tests
38-
python -m invoke -c test_setup build-protos
39-
python -m invoke -c test_setup webhost --branch-name=dev
40-
python -m invoke -c test_setup extensions
29+
chmod +x eng/scripts/install-dependencies.sh
30+
chmod +x eng/scripts/test-setup.sh
31+
32+
eng/scripts/install-dependencies.sh $(PYTHON_VERSION)
33+
eng/scripts/test-setup.sh
4134
displayName: 'Install dependencies'
4235
- bash: |
43-
python -m pytest -q -n auto --dist loadfile --reruns 4 --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch tests/unittests
36+
python -m pytest -q -n auto --dist loadfile --reruns 4 --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch tests/unittests
4437
displayName: "Running $(PYTHON_VERSION) Unit Tests"
4538

eng/templates/official/jobs/ci-custom-image-tests.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ jobs:
1212
inputs:
1313
versionSpec: $(CUSTOM_PYTHON_VERSION)
1414
- bash: |
15-
python -m pip install -U -e .[dev]
16-
if [[ $(PYTHON_VERSION) != "3.7" ]]; then
17-
python -m pip install --pre -U -e .[test-http-v2]
18-
fi
19-
if [[ $(PYTHON_VERSION) != "3.7" && $(PYTHON_VERSION) != "3.8" ]]; then
20-
python -m pip install --pre -U -e .[test-deferred-bindings]
21-
fi
15+
chmod +x eng/scripts/install-dependencies.sh
16+
17+
eng/scripts/install-dependencies.sh $(PYTHON_VERSION)
2218
cd tests
2319
python -m invoke -c test_setup build-protos
2420
displayName: 'Install dependencies'

eng/templates/official/jobs/ci-docker-consumption-tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ jobs:
5151
inputs:
5252
versionSpec: $(PYTHON_VERSION)
5353
- bash: |
54-
python -m pip install -U -e .[dev]
55-
python -m pip install --pre -U -e .[test-http-v2]
56-
if [[ $(PYTHON_VERSION) != "3.8" ]]; then
57-
python -m pip install --pre -U -e .[test-deferred-bindings]
58-
fi
54+
chmod +x eng/scripts/install-dependencies.sh
55+
56+
eng/scripts/install-dependencies.sh $(PYTHON_VERSION)
5957
cd tests
6058
python -m invoke -c test_setup build-protos
6159
displayName: 'Install dependencies'

eng/templates/official/jobs/ci-docker-dedicated-tests.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@ jobs:
5151
inputs:
5252
versionSpec: $(PYTHON_VERSION)
5353
- bash: |
54-
python -m pip install -U -e .[dev]
55-
python -m pip install --pre -U -e .[test-http-v2]
56-
if [[ $(PYTHON_VERSION) != "3.8" ]]; then
57-
python -m pip install --pre -U -e .[test-deferred-bindings]
58-
fi
54+
chmod +x eng/scripts/install-dependencies.sh
55+
56+
eng/scripts/install-dependencies.sh $(PYTHON_VERSION)
5957
cd tests
6058
python -m invoke -c test_setup build-protos
6159
displayName: 'Install dependencies'

0 commit comments

Comments
 (0)