Skip to content

Commit 2b43e42

Browse files
committed
build: drop tox in favor of poe
1 parent 9333410 commit 2b43e42

File tree

5 files changed

+105
-88
lines changed

5 files changed

+105
-88
lines changed

.flake8

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[flake8]
2+
max-line-length = 120
3+
ignore = E722, E731, E741, W504, E203, W503
4+
exclude =
5+
build/,
6+
dist/,
7+
.cache/,
8+
.tox/,
9+
benchmarks/,
10+
examples/,
11+
library/,
12+
library-asm/,
13+
src/parsetab/,
14+
src/ply/,
15+
scratch/,
16+
venv/,
17+
.git/

.github/workflows/python-app.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
pull_request:
1010
branches: [ master ]
1111

12+
env:
13+
POETRY_VIRTUALENVS_CREATE: false
14+
1215
jobs:
1316
build:
1417

@@ -32,15 +35,9 @@ jobs:
3235
python -m pip install --upgrade pip
3336
pip install poetry
3437
poetry install
35-
- name: Cache tox environments
36-
id: cache-tox
37-
uses: actions/cache@v2
38-
with:
39-
path: .tox
40-
# setup.cfg, pyproject.toml, and .pre-commit-config.yaml have
41-
# versioning info that would impact the tox environment. hashFiles
42-
# only takes a single file path or pattern at the moment.
43-
key: ${{ runner.os }}-${{ matrix.python }}-tox-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}
44-
45-
- name: Run Tox
46-
run: poetry run tox -- --no-cov
38+
39+
- name: Lint code
40+
run: poe lint
41+
42+
- name: Run tests
43+
run: poe test

poetry.lock

Lines changed: 57 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,15 @@ zxbpp = 'src.libzxbpp.zxbpp:entry_point'
4444
python = "^3.8"
4545

4646
[tool.poetry.dev-dependencies]
47-
tox = "^3.15.1"
4847
flake8 = "^3.8.2"
4948
pytest = "^6.2.5"
5049
pytest-timeout = "^1.3.4"
5150
bump2version = "^1.0.0"
5251
pre-commit = "^2.15.0"
5352
black = "^22.1.0"
5453
mkdocs = "^1.2.2"
54+
poethepoet = "^0.15.0"
55+
pytest-cov = "^3.0.0"
5556

5657
[build-system]
5758
requires = ["poetry>=0.12"]
@@ -60,3 +61,23 @@ build-backend = "poetry.masonry.api"
6061
[tool.black]
6162
line-length = 120
6263
target-version = ['py38']
64+
65+
[tool.poe.tasks]
66+
[[tool.poe.tasks.lint]]
67+
help = "Check code style and typing..."
68+
shell = """
69+
flake8 src tests &&
70+
black --check src tests
71+
"""
72+
73+
[[tool.poe.tasks.test]]
74+
help = "Run tests"
75+
shell = "pytest tests --color=yes"
76+
77+
[[tool.poe.tasks.format]]
78+
help = "Formats code"
79+
shell = "black src tests"
80+
81+
[tool.pytest.ini_options]
82+
minversion = "6.0"
83+
norecursedirs = ["test_*tmp", "runtime"]

tox.ini

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

0 commit comments

Comments
 (0)