Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: Use uv instead of pip during ci tests #440

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/lintandformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,22 @@ jobs:
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.11"
cache: "pip"

- name: Cache uv folder
id: cache-uv
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-uv-${{ hashFiles('requirements-common.txt', 'requirements-dev.txt') }}

- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install "fastapi[all]"
run: uv pip install --system -r requirements-dev.txt

- name: Cache .ruff_cache folder
id: ruff_cache
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,22 @@ jobs:
# Setup Python (faster than using Python container)
- name: Setup Python
uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.11"
cache: "pip"

- name: Cache uv folder
id: cache-uv
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-uv-${{ hashFiles('requirements-common.txt', 'requirements-dev.txt') }}

- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install "fastapi[all]"
run: uv pip install --system -r requirements-dev.txt

- name: Cache .pytest_cache folder
id: pytest_cache
Expand Down