Skip to content

CVector-Energy/python-test

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Python Poetry Test Action

Test Poetry-based projects using ruff, mypy, and pytest.

  1. Install Python
  2. Installs Poetry
  3. Installs dependencies
  4. Runs ruff check on source directories
  5. Runs ruff format --check on source directories
  6. Runs mypy on source directories
  7. Runs pytest

Inputs

Input Description Required Default
python-version Python version to use No 3.14
poetry-version Poetry version to install No 2.2.1
src-dirs Source directories for linting (space-separated) No .

Usage

steps:
  - name: Checkout
    uses: actions/checkout@v6

  - name: Test with Poetry
    uses: CVector-Energy/python-test@main

With custom Python version

steps:
  - name: Checkout
    uses: actions/checkout@v6

  - name: Test with Poetry
    uses: CVector-Energy/python-test@main
    with:
      python-version: "3.12"

Matrix testing

jobs:
  test:
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.14"]

    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - name: Test with Poetry
        uses: your-org/python-test@main
        with:
          python-version: ${{ matrix.python-version }}

About

GitHub Action for testing a Python repo using ruff, mypy, and pytest

Resources

License

Stars

Watchers

Forks

Packages

No packages published