Skip to content

Commit 3952d18

Browse files
committed
initial commit
1 parent 65b9cfb commit 3952d18

3 files changed

Lines changed: 37 additions & 36 deletions

File tree

.github/workflows/python-test.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,22 @@ name: Python Package Test
66
on: [push, pull_request]
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
python-version: ["3.11", "3.12", "3.13", "3.14"]
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.11", "3.12", "3.13", "3.14"]
1515

16-
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v3
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip tox
25-
- name: Test with tox
26-
run: |
27-
export py_ver=$( echo "${{ matrix.python-version }}" | sed 's/\.//')
28-
tox -e py${py_ver}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip hatch
25+
- name: Test with hatch
26+
run: |
27+
hatch test -vacr

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,25 @@ check = "mypy --install-types --non-interactive {args:src/codeaudit tests}"
5959
[[tool.hatch.envs.hatch-test.matrix]]
6060
python = ["3.14", "3.13", "3.12", "3.11"]
6161

62+
[tool.hatch.envs.hatch-test]
63+
randomize = true
64+
dependencies = ["pytest", "pytest-cov", "coverage"]
65+
6266
[tool.black]
6367
target-version = ["py311", "py312", "py313", "py314"]
6468
extend-exclude ='(python2_file_willnotwork|dunderexec_with_parsing_error).py|validationfiles|suppression|spytestdir'
69+
70+
[tool.coverage.run]
71+
branch = true
72+
source = ["src/codeaudit"]
73+
74+
[tool.coverage.report]
75+
show_missing = true
76+
77+
[tool.hatch.envs.hatch-static-analysis]
78+
dependencies = ["black", "pylint"]
79+
80+
[tool.hatch.envs.hatch-static-analysis.scripts]
81+
format-check = "black --target-version py313 --check src tests"
82+
format-fix = "black --target-version py313 src tests"
83+
lint-check = "pylint src tests"

tox.ini

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)