Skip to content

Commit

Permalink
Update tox and gh workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dosaboy committed May 15, 2024
1 parent 467cca5 commit 146c650
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 3 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}}

0 comments on commit 146c650

Please sign in to comment.