Skip to content

Commit cc88794

Browse files
committed
Move pytest config to pyproject.toml from setup.cfg
1 parent ab8d431 commit cc88794

File tree

4 files changed

+42
-39
lines changed

4 files changed

+42
-39
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# For documentation on GitHub Actions Workflows, see:
2+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
name: "build"
4+
5+
on: [ push, pull_request ]
6+
7+
jobs:
8+
build:
9+
strategy:
10+
matrix:
11+
os: [ ubuntu-latest, macos-latest, windows-latest ]
12+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
13+
fail-fast: false
14+
runs-on: ${{ matrix.os }}
15+
steps:
16+
- uses: actions/checkout@v4 # https://github.com/actions/checkout
17+
with:
18+
# Only a single commit is fetched by default, for the ref/SHA that triggered the workflow.
19+
# Set fetch-depth: 0 to fetch all history for all branches and tags.
20+
fetch-depth: 0 # Needed for setuptools_scm to work correctly
21+
- uses: actions/setup-python@v5 # https://github.com/actions/setup-python
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
allow-prereleases: true
25+
- name: Install dependencies
26+
run: python -m pip install --upgrade pip setuptools setuptools-scm nox
27+
- name: Run tests and post coverage results
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: python -m nox --non-interactive --session tests-${{ matrix.python-version }} # Run nox for a single version of Python

.github/workflows/ci.yml

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

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ warn_return_any = true
4848
warn_unreachable = true
4949
warn_unused_ignores = false
5050

51+
[tool.pytest.ini_options]
52+
testpaths = [
53+
"tests",
54+
"tests_isolated",
55+
]
56+
addopts = [
57+
"--cov=cmd2",
58+
"--cov-append",
59+
"--cov-report=term",
60+
"--cov-report=html",
61+
]
62+
5163
[tool.ruff]
5264
# Exclude a variety of commonly ignored directories.
5365
exclude = [

setup.cfg

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

0 commit comments

Comments
 (0)