mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2025-05-08 14:16:01 +02:00
Use uv instead of poetry
This commit is contained in:
16
.github/workflows/python-app.yml
vendored
16
.github/workflows/python-app.yml
vendored
@ -28,19 +28,17 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install poetry
|
||||
run: pipx install poetry
|
||||
- uses: actions/setup-python@v5
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: 'poetry'
|
||||
- run: poetry install
|
||||
version: 'latest'
|
||||
- run: uv sync
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Set up PostgreSQL
|
||||
run: |
|
||||
pg_isready -U postgres -d dspacestatistics
|
||||
@ -52,7 +50,7 @@ jobs:
|
||||
PGPASSWORD: postgres
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
poetry run pytest
|
||||
uv run pytest
|
||||
env:
|
||||
PGHOST: localhost
|
||||
PGPASSWORD: dspacestatistics
|
||||
|
Reference in New Issue
Block a user