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
34 changes: 15 additions & 19 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@ name: Python Package Test
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Test with tox
run: |
export py_ver=$( echo "${{ matrix.python-version }}" | sed 's/\.//')
tox -e py${py_ver}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
# this is needed only to install hatch
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip hatch
- name: Test with hatch
run: |
hatch test -acr
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,25 @@ check = "mypy --install-types --non-interactive {args:src/codeaudit tests}"
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.14", "3.13", "3.12", "3.11"]

[tool.hatch.envs.hatch-test]
randomize = true
dependencies = ["pytest", "pytest-cov", "coverage"]

[tool.black]
target-version = ["py311", "py312", "py313", "py314"]
extend-exclude ='(python2_file_willnotwork|dunderexec_with_parsing_error).py|validationfiles|suppression|spytestdir'

[tool.coverage.run]
branch = true
source = ["src/codeaudit"]

[tool.coverage.report]
show_missing = true

[tool.hatch.envs.hatch-static-analysis]
dependencies = ["black", "pylint"]

[tool.hatch.envs.hatch-static-analysis.scripts]
format-check = "black --target-version py313 --check src tests"
format-fix = "black --target-version py313 src tests"
lint-check = "pylint src tests"
17 changes: 0 additions & 17 deletions tox.ini

This file was deleted.

Loading