Add PyPI publish workflow using Trusted Publishing #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install | |
| run: python -m pip install -e ".[dev]" | |
| - name: Test | |
| run: pytest -q | |
| - name: Lint the example (must report findings) | |
| run: | | |
| if timeleak examples/leaky_pipeline.py; then | |
| echo "::error::expected timeleak to find leaks in the example" | |
| exit 1 | |
| fi | |
| - name: Lint own source (must be clean) | |
| run: timeleak src tests |