fix(release): rename workflow to pypi-publish.yml to match PyPI trust… #337
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, dev] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v3 | |
| - run: uv python install 3.13 | |
| - run: uv sync --extra dev | |
| - run: uv run ruff check . | |
| secrets: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| validate-flows: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v3 | |
| - run: uv python install 3.13 | |
| - run: uv sync --extra dev | |
| - run: bash -c 'for f in .flowr/flows/*.yaml; do uv run python -m flowr validate "$f"; done' | |
| enforce: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v3 | |
| - run: uv python install 3.13 | |
| - run: uv sync --extra dev | |
| - name: Resolve package | |
| id: pkg | |
| run: | | |
| pkg="" | |
| for d in */ ; do | |
| d="${d%/}" | |
| case "$d" in | |
| tests|docs|explore) continue ;; | |
| esac | |
| [ -f "$d/__init__.py" ] && pkg="$d" && break | |
| done | |
| if [ -n "$pkg" ] && [ -d tests ]; then | |
| echo "have_pkg=true" >> "$GITHUB_OUTPUT" | |
| echo "name=$pkg" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "have_pkg=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: pyright | |
| if: steps.pkg.outputs.have_pkg == 'true' | |
| run: uv run pyright ${{ steps.pkg.outputs.name }} tests | |
| - name: stubtest (drift detection for source and test .pyi) | |
| if: steps.pkg.outputs.have_pkg == 'true' | |
| run: uv run python -m mypy.stubtest ${{ steps.pkg.outputs.name }} tests | |
| - name: pytest (replay cassettes, offline) | |
| if: steps.pkg.outputs.have_pkg == 'true' | |
| env: | |
| VCR_RECORD_MODE: none | |
| run: uv run pytest |