Skip to content

Move pytest config to pyproject.toml from setup.cfg #1345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 23, 2024
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
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# For documentation on GitHub Actions Workflows, see:
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: CI
name: "build"

on: [ push, pull_request ]

jobs:
ci:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4 # https://github.com/actions/checkout
with:
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
# Set fetch-depth: 0 to fetch all history for all branches and tags.
fetch-depth: 0 # Needed for setuptools_scm to work correctly
- name: Set up Python
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
- uses: actions/setup-python@v5 # https://github.com/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install python prerequisites
run: pip install -U --user pip setuptools setuptools-scm nox
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools setuptools-scm nox
- name: Run tests and post coverage results
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ warn_return_any = true
warn_unreachable = true
warn_unused_ignores = false

[tool.pytest.ini_options]
testpaths = [
"tests",
"tests_isolated",
]
addopts = [
"--cov=cmd2",
"--cov-append",
"--cov-report=term",
"--cov-report=html",
]

[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
Expand Down
8 changes: 0 additions & 8 deletions setup.cfg

This file was deleted.

Loading