dev tooling: uv + Makefile + tighter CI, secret-redacted repr #3
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] | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} · py${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Install project (locked) | |
| run: uv sync --all-extras | |
| - name: Lint (ruff check) | |
| run: uv run ruff check src tests | |
| - name: Format (ruff format --check) | |
| run: uv run ruff format --check src tests | |
| - name: Type-check (mypy) | |
| run: uv run mypy src | |
| - name: Unit tests (with coverage) | |
| run: | | |
| uv run pytest tests/unit -q \ | |
| --cov=lago_agent_sdk \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml \ | |
| --cov-fail-under=80 | |
| - name: Upload coverage artifact | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-xml | |
| path: coverage.xml | |
| if-no-files-found: warn |