feat(telemetry): widen usage attrs, add metrics histograms, opt-in content events #543
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, develop] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main, develop] | |
| workflow_call: | |
| inputs: | |
| python-version: | |
| required: false | |
| type: string | |
| default: '3.12' | |
| skip-tests: | |
| required: false | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| format-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/setup-python-uv | |
| with: | |
| python-version: ${{ inputs.python-version || '3.12' }} | |
| - run: uv run ruff format --check src/celeste tests/ | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/setup-python-uv | |
| with: | |
| python-version: ${{ inputs.python-version || '3.12' }} | |
| - run: uv run ruff check --output-format=github src/celeste tests/ | |
| type-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/setup-python-uv | |
| with: | |
| python-version: ${{ inputs.python-version || '3.12' }} | |
| - run: uv sync --extra otel | |
| - run: uv run mypy -p celeste && uv run mypy tests/ | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/setup-python-uv | |
| with: | |
| python-version: ${{ inputs.python-version || '3.12' }} | |
| - run: uv run bandit -c pyproject.toml -r src/ -f screen | |
| test: | |
| if: ${{ !inputs.skip-tests }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13"] | |
| os: [ubuntu-latest] | |
| include: | |
| - python-version: "3.12" | |
| os: windows-latest | |
| - python-version: "3.12" | |
| os: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: ./.github/actions/setup-python-uv | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: uv sync --extra gcp | |
| - run: uv run pytest tests/unit_tests -v --cov=celeste --cov-report=term-missing --cov-report=xml --cov-report=html --cov-fail-under=80 | |
| - uses: codecov/codecov-action@v4 | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false |