Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
etianen committed Jan 14, 2024
1 parent 2c2fff7 commit 0583211
Show file tree
Hide file tree
Showing 8 changed files with 385 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build

on: push

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
# Install toolchain.
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pipx install poetry
# Install dependencies.
- run: poetry check
- run: poetry check --lock
- run: poetry env use "python${{ matrix.python-version }}"
- run: poetry install
# Run checks.
- run: poetry run ruff check
- run: poetry run ruff format --check
- run: poetry run mypy
# Run tests.
- run: poetry run pytest
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/__pycache__
**/*.py[cod]
/.coverage
/.mypy_cache
/.venv
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Log-based testing

[![Build](https://github.com/etianen/logtest/actions/workflows/build.yml/badge.svg)](https://github.com/etianen/logtest/actions/workflows/build.yml)
Empty file added logtest/__init__.py
Empty file.
281 changes: 281 additions & 0 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[virtualenvs]
in-project = true

[virtualenvs.options]
no-pip = true
no-setuptools = true
57 changes: 57 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[tool.poetry]
name = "logtest"
version = "0.1.0"
description = "Log-based testing"
authors = ["Dave Hall <[email protected]>"]
license = "MIT"
readme = "README.md"
homepage = "https://logtest.readthedocs.io"
repository = "https://github.com/etianen/logtest"
documentation = "https://logtest.readthedocs.io"
keywords = ["test", "unittest", "pytest"]
packages = [{ include = "logtest" }]

[tool.poetry.dependencies]
python = "^3.8"

[tool.poetry.group.dev.dependencies]
mypy = "^1.8.0"
ruff = "^0.1.11"
pytest = "^7.4.4"
pytest-cov = "^4.1.0"

[tool.coverage.run]
source = ["logtest", "tests"]

[tool.coverage.report]
show_missing = true
skip_covered = true
fail_under = 100
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"raise AssertionError",
"assert False",
]

[tool.mypy]
files = ["logtest/**/*.py", "tests/**/*.py"]
allow_redefinition = true
explicit_package_bases = true
show_column_numbers = true
strict = true
platform = "linux"

[tool.pytest.ini_options]
testpaths = ["tests"]
console_output_style = "classic"
addopts = "--tb=native --cov"

[tool.ruff]
include = ["logtest/**/*.py", "tests/**/*.py"]
line-length = 120
select = ["E", "F", "W", "I", "UP"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Empty file added tests/__init__.py
Empty file.

0 comments on commit 0583211

Please sign in to comment.