fix(ci): mock _import_agentic in ProjectContext tests, add ruff to de… #19
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, staging] | |
| pull_request: | |
| branches: [main, staging] | |
| 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@v5 | |
| with: | |
| version: "latest" | |
| - run: uv sync --group dev | |
| - run: uv run ruff check src/ | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| - run: uv python install ${{ matrix.python-version }} | |
| - run: uv sync --group dev --python ${{ matrix.python-version }} | |
| - run: uv run pytest --tb=short -q | |
| env: | |
| VENTURALITICA_NO_ANALYTICS: "1" | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| version: "latest" | |
| - run: uv build | |
| - name: Verify sdist size < 5MB | |
| run: | | |
| SDIST_SIZE=$(stat -c%s dist/*.tar.gz) | |
| echo "sdist size: $SDIST_SIZE bytes" | |
| if [ "$SDIST_SIZE" -gt 5242880 ]; then | |
| echo "::error::sdist is too large ($SDIST_SIZE bytes > 5MB)" | |
| exit 1 | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ |