diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8f93587 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + pull_request: + branches: [ main, master ] + +jobs: + test: + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + matrix: + python-version: ["3.11", "3.12", "3.13", "3.14"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + allow-prereleases: true + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install mypy ruff + + - name: Lint with ruff + run: | + ruff check winnowing tests + + - name: Type check with mypy + run: | + mypy winnowing --ignore-missing-imports + + - name: Test with pytest + run: | + pytest tests --cov winnowing --durations=10 diff --git a/.gitignore b/.gitignore index 2f78cf5..7db1ef9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.pyc +.coverage diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ce488d8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[tool.ruff.lint] +select = ["E", "F", "W", "I"] +ignore = [] + +# Allow star imports in test files +[tool.ruff.lint.per-file-ignores] +"tests/*" = ["F403", "F405"]