Skip to content

fix(trace): [4/4] 实际连接按链路聚合,消除新旧连接并存时的误报 #55

fix(trace): [4/4] 实际连接按链路聚合,消除新旧连接并存时的误报

fix(trace): [4/4] 实际连接按链路聚合,消除新旧连接并存时的误报 #55

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (${{ matrix.os }} / Python ${{ matrix.python }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
run: uv python install ${{ matrix.python }}
- name: Install dev dependencies
run: uv sync --group dev
- name: Run pytest with coverage
run: |
uv run pytest \
--cov=proxyctl \
--cov-report=term-missing \
--cov-report=xml \
--cov-report=html \
--junitxml=junit.xml \
-v
- name: Coverage summary
if: always()
run: |
echo "## Coverage (${{ matrix.os }} / Python ${{ matrix.python }})" >> $GITHUB_STEP_SUMMARY
uv run coverage report --format=markdown >> $GITHUB_STEP_SUMMARY || true
- name: Upload coverage XML
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.12'
uses: actions/upload-artifact@v7
with:
name: coverage-xml
path: coverage.xml
if-no-files-found: warn
- name: Upload coverage HTML
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.12'
uses: actions/upload-artifact@v7
with:
name: coverage-html
path: htmlcov/
if-no-files-found: warn
build:
name: Build distribution
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build sdist & wheel
run: uv build
- name: Check distribution metadata
run: uvx twine check dist/*
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/