Skip to content

Commit

Permalink
fix(ci): use uv for ci deps installing
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrgredowski committed Sep 19, 2024
1 parent d953762 commit 6d83aa4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
32 changes: 14 additions & 18 deletions .github/actions/setup-ci/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ description: Setup Python and pre-commit for CI
runs:
using: composite
steps:
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: |
requirements.lock
requirements-dev.lock
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -r requirements.lock -r requirements-dev.lock
- name: Cache pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true

- name: Set up Python
shell: bash
run: uv python install

- name: Install the project
shell: bash
run: uv sync --all-extras --dev
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./.github/actions/setup-ci
- name: Pre-commit
run: |
SKIP=unittests pre-commit run --all-files --color=always
SKIP=unittests uv run pre-commit run --all-files --color=always
unittests:
runs-on: ubuntu-latest
steps:
Expand All @@ -29,4 +29,4 @@ jobs:
uses: ./.github/actions/setup-ci
- name: Test with pytest
run: |
python -m pytest .
uv run pytest .
4 changes: 2 additions & 2 deletions src/profiling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install pip --upgrade
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/MacOS
pip install pyinstrument snakeviz
```

Expand Down

0 comments on commit 6d83aa4

Please sign in to comment.