patchh for error handling and error message #122
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: Python Tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| unit: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| cache: poetry | |
| - name: Check Poetry configuration | |
| run: poetry check | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Run tests | |
| run: > | |
| poetry run pytest tests | |
| --junitxml=pytest.xml | |
| --cov=llm_tracker | |
| --cov-report=term-missing:skip-covered | |
| --cov-report=xml:coverage.xml | |
| --log-level=DEBUG | |
| --verbose | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.12' | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: poetry | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Ruff format | |
| run: poetry run ruff format --check | |
| - name: Ruff check | |
| run: poetry run ruff check | |
| mypy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: poetry | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Mypy | |
| run: poetry run mypy . | |
| deptry: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: poetry | |
| - name: Install dependencies | |
| run: poetry install --no-interaction | |
| - name: Deptry | |
| run: poetry run deptry src |