Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ jobs:
py38: 3.8
py39: 3.9
py310: "3.10"
py311: "3.11"
RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
python-version: [ py37, py38, py39, py310 ]
python-version: [ py37, py38, py39, py310, py311 ]
package: ["distro"]
os: [ ubuntu-20.04, windows-2019 ]
steps:
Expand All @@ -31,7 +32,7 @@ jobs:
python-version: ${{ env[matrix.python-version] }}
architecture: 'x64'
- name: Install tox
run: pip install -U tox-factor
run: pip install tox==3.27.1 -U tox-factor
- name: Cache tox environment
# Preserves .tox directory between runs for faster installs
uses: actions/cache@v2
Expand All @@ -40,6 +41,11 @@ jobs:
.tox
~/.cache/pip
key: v3-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('tox.ini', 'test-requirements.txt') }}
- name: Windows does not let git check out files with long names
if: ${{ matrix.os == 'windows-2019'}}
run: git config --system core.longpaths true
- name: run tox
run: tox -f ${{ matrix.python-version }}-${{ matrix.package }}
misc:
strategy:
fail-fast: false
Expand All @@ -53,7 +59,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.11
architecture: 'x64'
- name: Install tox
run: pip install -U tox
Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pytest
psycopg2
flask
django
requests
12 changes: 8 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@
skipsdist = True
skip_missing_interpreters = True
envlist =
py3{6,7,8,9,10,11}-distro
py3{7,8,9,10,11}-distro
lint

[testenv]
deps =
-r test-requirements.txt

changedir =
distro: azure-monitor-opentelemetry-distro/tests

commands_pre =
python -m pip install -e {toxinidir}/azure-monitor-opentelemetry-distro
py3{7,8,9,10,11}: python -m pip install -U pip setuptools wheel
distro: pip install {toxinidir}/azure-monitor-opentelemetry-distro

commands =
pytest {posargs}
distro: pytest {posargs}

[testenv:lint]
basepython: python3.9
basepython: python3.11
recreate = True
deps =
-r lint-requirements.txt
Expand Down