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
17 changes: 17 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[flake8]
max-line-length = 120
ignore = E722, E731, E741, W504, E203, W503
exclude =
build/,
dist/,
.cache/,
.tox/,
benchmarks/,
examples/,
library/,
library-asm/,
src/parsetab/,
src/ply/,
scratch/,
venv/,
.git/
21 changes: 9 additions & 12 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
pull_request:
branches: [ master ]

env:
POETRY_VIRTUALENVS_CREATE: false

jobs:
build:

Expand All @@ -32,15 +35,9 @@ jobs:
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Cache tox environments
id: cache-tox
uses: actions/cache@v2
with:
path: .tox
# setup.cfg, pyproject.toml, and .pre-commit-config.yaml have
# versioning info that would impact the tox environment. hashFiles
# only takes a single file path or pattern at the moment.
key: ${{ runner.os }}-${{ matrix.python }}-tox-${{ hashFiles('setup.cfg') }}-${{ hashFiles('pyproject.toml') }}

- name: Run Tox
run: poetry run tox -- --no-cov

- name: Lint code
run: poe lint

- name: Run tests
run: poe test
84 changes: 57 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 22 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ zxbpp = 'src.libzxbpp.zxbpp:entry_point'
python = "^3.8"

[tool.poetry.dev-dependencies]
tox = "^3.15.1"
flake8 = "^3.8.2"
pytest = "^6.2.5"
pytest-timeout = "^1.3.4"
bump2version = "^1.0.0"
pre-commit = "^2.15.0"
black = "^22.1.0"
mkdocs = "^1.2.2"
poethepoet = "^0.15.0"
pytest-cov = "^3.0.0"

[build-system]
requires = ["poetry>=0.12"]
Expand All @@ -60,3 +61,23 @@ build-backend = "poetry.masonry.api"
[tool.black]
line-length = 120
target-version = ['py38']

[tool.poe.tasks]
[[tool.poe.tasks.lint]]
help = "Check code style and typing..."
shell = """
flake8 src tests &&
black --check src tests
"""

[[tool.poe.tasks.test]]
help = "Run tests"
shell = "pytest tests --color=yes"

[[tool.poe.tasks.format]]
help = "Formats code"
shell = "black src tests"

[tool.pytest.ini_options]
minversion = "6.0"
norecursedirs = ["test_*tmp", "runtime"]
48 changes: 0 additions & 48 deletions tox.ini

This file was deleted.