Skip to content

Simplify quality gate workflows and enhance monitor coverage #43

Simplify quality gate workflows and enhance monitor coverage

Simplify quality gate workflows and enhance monitor coverage #43

Workflow file for this run

name: CI
on:
push:
branches: [main, test]
pull_request:
branches: [main, test]
workflow_call: # allows other workflows to call this one with `uses:`
permissions:
contents: read # minimum needed for checkout
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Lint with ruff
run: ruff check ptop3/
- name: Run tests
run: pytest --junitxml=test-results-${{ matrix.python-version }}.xml --cov=ptop3 --cov-report=xml:coverage-${{ matrix.python-version }}.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
files: test-results-${{ matrix.python-version }}.xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage-${{ matrix.python-version }}.xml