Skip to content

Commit

Permalink
Move pytest config to pyproject.toml from setup.cfg (#1345)
Browse files Browse the repository at this point in the history
* Move pytest config to pyproject.toml from setup.cfg

* Fix build workflow

* Fix build.yml GitHub Action workflow
  • Loading branch information
tleonhardt authored Oct 23, 2024
1 parent ab8d431 commit 5a00d6d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
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.

0 comments on commit 5a00d6d

Please sign in to comment.