Skip to content

Commit

Permalink
Replace Poetry with UV (CI workflow only)
Browse files Browse the repository at this point in the history
TODO: Publish workflow
  • Loading branch information
phyrwork committed Aug 28, 2024
1 parent 65dda89 commit 9f71203
Show file tree
Hide file tree
Showing 4 changed files with 373 additions and 475 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
poetry-version: [ "1.8.3" ]
uv-version: [ "1.8.3" ]
os: [ ubuntu-22.04 ]

runs-on: ${{ matrix.os }}
Expand All @@ -29,33 +29,28 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Set up Poetry ${{ matrix.poetry-version }}
uses: abatilo/actions-poetry@v2
- name: Set up uv ${{ matrix.uv-version }}
uses: yezz123/setup-uv@v4
with:
poetry-version: ${{ matrix.poetry-version }}
uv-version: "0.3.5"

- name: Set up virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v3
name: Define a cache for the virtual environment based on the dependencies lock file
- name: Set up cache
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
key: venv-${{ hashFiles('uv.lock') }}

- name: Install dependencies
run: poetry install
run: uv sync

- name: Check code style
run: poetry run black --check .
run: uv run black --check .

- name: Check imports order
run: poetry run isort --check .
run: uv run isort --check .

- name: Check types
run: poetry run mypy .
run: uv run mypy .

- name: Run unit tests
run: poetry run pytest .
run: uv run pytest .
Loading

0 comments on commit 9f71203

Please sign in to comment.