Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Pytest Config

  • 93 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

Wire pytest into GitHub Actions with coverage, markers, and multi-version Python matrices for a developer’s repo.

About

This skill packages CI/CD integration patterns for pytest, centered on GitHub Actions and everyday test commands a solo or indie developer runs locally and in the cloud. It documents how to install dev extras, run full suites with HTML or XML coverage, filter by markers such as unit versus slow, rerun failures first, scale with pytest-xdist, and stop early on regressions. The workflow templates cover checkout, setup-python, editable installs, and optional codecov publishing, plus a matrix job pattern for testing across three Python versions. It is aimed at builders shipping Python libraries or services who want repeatable gates without hiring a platform team. Use it when standing up or tightening automated testing on every push rather than relying on manual pytest runs alone.

  • Copy-paste GitHub Actions test.yml for push and pull_request triggers
  • pytest CLI recipes: coverage, markers, failed-first, parallel (-n auto), -x, -l
  • Matrix strategy example for Python 3.10, 3.11, and 3.12
  • Codecov upload step paired with --cov-report=xml
  • Parent skill leyline:pytest-config; reusable for .github/workflows/test.yml

Pytest Config by the numbers

  • 93 all-time installs (skills.sh)
  • Ranked #561 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill pytest-config

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs93
repo stars325
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Wire pytest into GitHub Actions with coverage, markers, and multi-version Python matrices for a developer’s repo.

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

Pytest Configuration Patterns

Standardized pytest configuration and patterns for consistent testing infrastructure across Claude Night Market plugins.

When To Use

  • Setting up pytest configuration and fixtures
  • Configuring conftest.py patterns for test infrastructure

When NOT To Use

  • Non-Python projects or projects using other test frameworks
  • Simple scripts that do not need test infrastructure

Quick Start

Basic pyproject.toml Configuration

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
    "-v",
    "--cov=src",
    "--cov-report=term-missing",
    "--cov-fail-under=80",
    "--strict-markers",
]
markers = [
    "unit: marks tests as unit tests",
    "integration: marks tests as integration tests",
    "slow: marks tests as slow running",
]

[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/migrations/*", "*/__pycache__/*"]
branch = true

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "def __str__",
    "raise NotImplementedError",
    "if __name__ == .__main__.:",
    "if TYPE_CHECKING:",
    "class .*\\bProtocol\\):",
    "@(abc\\.)?abstractmethod",
]
precision = 2
show_missing = true

Verification: Run pytest --collect-only to verify discovery, pytest -v --co -q for markers, and pytest --cov for coverage thresholds.

Detailed Patterns

For detailed implementation patterns, see:

  • [Conftest Patterns](modules/conftest-patterns.md) - Conftest.py templates, fixtures, test markers, and directory structure
  • [Git Testing Fixtures](modules/git-testing-fixtures.md) - GitRepository helper class for testing git workflows
  • [Mock Fixtures](modules/mock-fixtures.md) - Mock tool fixtures for Bash, TodoWrite, and other Claude Code tools
  • [CI Integration](modules/ci-integration.md) - GitHub Actions workflows and test commands for automated testing
  • Module Index: See modules/README.md for module organization overview

Integration with Other Skills

This skill provides foundational patterns referenced by:

  • parseltongue:python-testing - Uses pytest configuration and fixtures
  • pensive:test-review - Uses test quality standards
  • sanctum:test-* - Uses conftest patterns and Git fixtures

Reference in your skill's frontmatter:

dependencies: [leyline:pytest-config, leyline:testing-quality-standards]

Exit Criteria

  • pytest configuration standardized across plugins
  • conftest.py provides reusable fixtures
  • test markers defined and documented
  • coverage configuration enforces quality thresholds
  • CI/CD integration configured for automated testing

Troubleshooting

Common Issues

Tests not discovered Ensure test files match pattern test_*.py or *_test.py. Run pytest --collect-only to verify.

Import errors Check that the module being tested is in PYTHONPATH or install with pip install -e .

Async tests failing Install pytest-asyncio and decorate test functions with @pytest.mark.asyncio

Related skills

FAQ

Is Pytest Config safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDdevopstesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.