From 146c650dd81a254ed157fed8099de2c2ce5bd28a Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Wed, 15 May 2024 10:19:18 +0100 Subject: [PATCH] Update tox and gh workflow --- .github/workflows/tests.yaml | 21 +++++++++++++++++---- tox.ini | 17 +++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 4115879..a8f34fe 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -8,13 +8,26 @@ jobs: test: strategy: matrix: - python-version: ['3.10'] - os: [ubuntu-22.04] + python-version: ['3.8', '3.10', '3.12'] + os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04] + exclude: + - os: ubuntu-24.04 + python-version: '3.8' + - os: ubuntu-24.04 + python-version: '3.10' + - os: ubuntu-22.04 + python-version: '3.8' + - os: ubuntu-22.04 + python-version: '3.12' + - os: ubuntu-20.04 + python-version: '3.10' + - os: ubuntu-20.04 + python-version: '3.12' runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/tox.ini b/tox.ini index c60f353..f0b54c5 100644 --- a/tox.ini +++ b/tox.ini @@ -7,14 +7,9 @@ minversion = 3.18.0 [testenv] basepython = {env:TOX_PYTHON:python3} unit_tests = {toxinidir}/tests/unit/ +pyfiles = {toxinidir}/setup.py {toxinidir}/searchkit/ {[testenv]unit_tests} passenv = TESTS_LOG_LEVEL_DEBUG -setenv = VIRTUAL_ENV={envdir} - PYTHONHASHSEED=0 - TERM=linux - SEARCHKIT_ROOT={toxinidir}/searchkit - TESTS_DIR={[testenv]unit_tests} - PYFILES={toxinidir}/setup.py {toxinidir}/searchkit/ {[testenv]unit_tests} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt @@ -23,15 +18,9 @@ commands = stestr run --serial --test-path {[testenv]unit_tests} {posargs} [testenv:pep8] allowlist_externals = flake8 commands = - flake8 -v {posargs:{env:PYFILES}} + flake8 -v {posargs:{[testenv]pyfiles}} [flake8] -# E126 continuation line over-indented for hanging indent -# E128 continuation line under-indented for visual indent -# E401 multiple imports on one line -# H301 one import per line -# W504 line break after binary operator -ignore = E126,E128,E401,H301,W504 # H106: Don't put vim configuration in source files # H203: Use assertIs(Not)None to check for None # H204: Use assert(Not)Equal to check for equality @@ -44,5 +33,5 @@ import-order-style = pep8 [testenv:pylint] allowlist_externals = pylint -commands = pylint -v --rcfile={toxinidir}/pylintrc {posargs:{env:PYFILES}} +commands = pylint -v --rcfile={toxinidir}/pylintrc {posargs:{[testenv]pyfiles}}