mirror of
https://github.com/ollama/ollama-python.git
synced 2026-10-12 11:57:27 +00:00
fix: don't run lints on all python versions (#400)
This commit is contained in:
@@ -20,17 +20,27 @@ jobs:
|
|||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
cache: poetry
|
cache: poetry
|
||||||
- run: poetry install --with=dev
|
- run: poetry install --with=dev
|
||||||
|
- run: poetry run pytest . --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=ollama --cov-report=xml --cov-report=html
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: pytest-results-${{ matrix.python-version }}
|
||||||
|
path: junit/test-results-${{ matrix.python-version }}.xml
|
||||||
|
if: ${{ always() }}
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: pipx install poetry
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.13"
|
||||||
|
cache: poetry
|
||||||
|
- run: poetry install --with=dev
|
||||||
- run: poetry run ruff check --output-format=github .
|
- run: poetry run ruff check --output-format=github .
|
||||||
- run: poetry run ruff format --check .
|
- run: poetry run ruff format --check .
|
||||||
- run: poetry run pytest . --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov=ollama --cov-report=xml --cov-report=html
|
|
||||||
- name: check poetry.lock is up-to-date
|
- name: check poetry.lock is up-to-date
|
||||||
run: poetry check --lock
|
run: poetry check --lock
|
||||||
- name: check requirements.txt is up-to-date
|
- name: check requirements.txt is up-to-date
|
||||||
run: |
|
run: |
|
||||||
poetry export >requirements.txt
|
poetry export >requirements.txt
|
||||||
git diff --exit-code requirements.txt
|
git diff --exit-code requirements.txt
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: pytest-results-${{ matrix.python-version }}
|
|
||||||
path: junit/test-results-${{ matrix.python-version }}.xml
|
|
||||||
if: ${{ always() }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user