feat: simplify install + upgrade — self-contained wheel, c3-mcp entry point, c3 upgrade (v2.36.0) #43
Workflow file for this run
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: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint (ruff) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install ruff | |
| run: python -m pip install --upgrade pip ruff | |
| - name: ruff check | |
| run: ruff check . | |
| test: | |
| name: Test (${{ matrix.os }} / py${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install package + dev extras | |
| # Editable install so tests run against the source tree (matches local dev). | |
| # Several tests patch `services.*` import paths that only work when the | |
| # source dir IS the installed package. A separate wheel-install job below | |
| # validates the production install path. | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev]" | |
| - name: Run pytest | |
| env: | |
| # Smoke tests must not initialize real telemetry | |
| SENTRY_DSN: "" | |
| C3_TELEMETRY_OPT_IN: "0" | |
| run: pytest -q | |
| build: | |
| name: Build distribution | |
| needs: [lint, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| - name: Install build tooling | |
| run: python -m pip install --upgrade pip build twine | |
| - name: Build sdist + wheel | |
| run: python -m build --sdist --wheel --outdir dist | |
| - name: twine check | |
| run: python -m twine check dist/* | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dist | |
| path: dist/ | |
| retention-days: 7 |