Skip to content

Commit 99faefb

Browse files
authored
Merge pull request #224 from lzchen/tox
2 parents ed8f2c8 + ccdb194 commit 99faefb

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ jobs:
1414
py38: 3.8
1515
py39: 3.9
1616
py310: "3.10"
17+
py311: "3.11"
1718
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
1819
runs-on: ${{ matrix.os }}
1920
strategy:
2021
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
2122
matrix:
22-
python-version: [ py37, py38, py39, py310 ]
23+
python-version: [ py37, py38, py39, py310, py311 ]
2324
package: ["distro"]
2425
os: [ ubuntu-20.04, windows-2019 ]
2526
steps:
@@ -31,7 +32,7 @@ jobs:
3132
python-version: ${{ env[matrix.python-version] }}
3233
architecture: 'x64'
3334
- name: Install tox
34-
run: pip install -U tox-factor
35+
run: pip install tox==3.27.1 -U tox-factor
3536
- name: Cache tox environment
3637
# Preserves .tox directory between runs for faster installs
3738
uses: actions/cache@v2
@@ -40,6 +41,11 @@ jobs:
4041
.tox
4142
~/.cache/pip
4243
key: v3-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'test-requirements.txt') }}
44+
- name: Windows does not let git check out files with long names
45+
if: ${{ matrix.os == 'windows-2019'}}
46+
run: git config --system core.longpaths true
47+
- name: run tox
48+
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }}
4349
misc:
4450
strategy:
4551
fail-fast: false
@@ -53,7 +59,7 @@ jobs:
5359
- name: Set up Python
5460
uses: actions/setup-python@v2
5561
with:
56-
python-version: 3.9
62+
python-version: 3.11
5763
architecture: 'x64'
5864
- name: Install tox
5965
run: pip install -U tox

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pytest
22
psycopg2
33
flask
4+
django
45
requests

tox.ini

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22
skipsdist = True
33
skip_missing_interpreters = True
44
envlist =
5-
py3{6,7,8,9,10,11}-distro
5+
py3{7,8,9,10,11}-distro
66
lint
77

88
[testenv]
99
deps =
1010
-r test-requirements.txt
1111

12+
changedir =
13+
distro: azure-monitor-opentelemetry-distro/tests
14+
1215
commands_pre =
13-
python -m pip install -e {toxinidir}/azure-monitor-opentelemetry-distro
16+
py3{7,8,9,10,11}: python -m pip install -U pip setuptools wheel
17+
distro: pip install {toxinidir}/azure-monitor-opentelemetry-distro
1418

1519
commands =
16-
pytest {posargs}
20+
distro: pytest {posargs}
1721

1822
[testenv:lint]
19-
basepython: python3.9
23+
basepython: python3.11
2024
recreate = True
2125
deps =
2226
-r lint-requirements.txt

0 commit comments

Comments
 (0)