Add PyPI Trusted Publishing release flow #1
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: | |
| pull_request: | |
| paths: | |
| - "cli/**" | |
| - ".github/workflows/ci.yml" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "cli/**" | |
| - ".github/workflows/ci.yml" | |
| jobs: | |
| test: | |
| name: Test CLI package | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: cli/uv.lock | |
| working-directory: cli | |
| - name: Install Python | |
| run: uv python install 3.12 | |
| - name: Sync dependencies | |
| run: uv sync --locked --dev | |
| - name: Type check | |
| run: uv run ty check | |
| - name: Run tests | |
| run: uv run pytest | |
| - name: Lint | |
| run: uv run ruff check | |
| - name: Check formatting | |
| run: uv run ruff format --check | |
| - name: Smoke test CLI help | |
| run: | | |
| uv run glasskit --help | |
| uv run glasskit eval --help | |
| - name: Build package | |
| run: uv build --no-sources --clear |