Skip to content

Commit

Permalink
fix(test): pin tox versions and update unit/int file specifiers (#702)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-ryan-k authored May 23, 2024
1 parent bcbe0ed commit c6a85d9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
python-version: ${{ matrix.py }}
- uses: actions/checkout@v4
- name: Install tox-gh
run: python -m pip install tox-gh
run: python -m pip install tox-gh tox==4.12.1
- name: Setup test suite
run: tox r -vv --notest
- name: Run test suite
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4
- name: Run code coverage
run: |
python -m pip install tox
python -m pip install tox==4.12.1
tox -e coverage
coverage=$(jq .totals.percent_covered coverage.json | cut -c1-4)
echo "Code coverage: $coverage%" >> $GITHUB_STEP_SUMMARY
Expand Down
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Release History
0.24.0
+++++++++++++++

**General updates**

* Updated the minimum core CLI version to 2.46.0

**IoT Product**

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Please refer to the official `az iot` reference on [Microsoft Docs](https://docs
## Installation
1. Install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
- You must have at least `v2.32.0` for the latest versions of `azure-iot`, which you can verify with `az --version`
- You must have at least `v2.46.0` for the latest versions of `azure-iot`, which you can verify with `az --version`
1. Add, Update or Remove the IoT extension with the following commands:
- Add: `az extension add --name azure-iot`
- Update: `az extension update --name azure-iot`
Expand Down
2 changes: 1 addition & 1 deletion azext_iot/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"azext.minCliCoreVersion": "2.37.0"
"azext.minCliCoreVersion": "2.46.0"
}
3 changes: 1 addition & 2 deletions dev_requirements
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest
pytest==8.1.1
pytest-mock==3.12.0
pytest-cov
pytest-env
Expand All @@ -11,4 +11,3 @@ pylint<=2.13.8
flake8
pytest-xdist
pytest-rerunfailures
tox
2 changes: 1 addition & 1 deletion docs/tox-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently, our testing matrix is broken up into the following groups:
- 3.10
- 3.11
- Azure CLI Core versions to test extension against:
- `azmin` installs the minimum supported CLI version (currently `2.32.0`)
- `azmin` installs the minimum supported CLI version (currently `2.46.0`)
- `azcur` installs the latest released CLI version from PyPi
- `azdev` installs the CLI from your local CLI instance (located at `../azure-cli`)
- Types of tests to run:
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ deps =
# base deps
{[base]deps}
# azure-cli deps
azmin: azure-cli==2.32.0
azmin: azure-cli==2.46.0
azcur: azure-cli
azdev: ../azure-cli/src/azure-cli
azdev: ../azure-cli/src/azure-cli-core
Expand All @@ -70,8 +70,8 @@ commands =
az -v
# run tests
# You can pass additional positional args to pytest using `-- {args}`
unit: pytest -k _unit ./azext_iot/tests {posargs}
int: pytest -k _int ./azext_iot/tests {posargs}
unit: pytest -k _unit.py ./azext_iot/tests {posargs}
int: pytest -k _int.py ./azext_iot/tests {posargs}

# tox-gh matrix (github action -> tox python environment)
[gh]
Expand Down

0 comments on commit c6a85d9

Please sign in to comment.