Skip to content

Commit

Permalink
Create venv manually
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus committed Jan 14, 2025
1 parent d59a1a6 commit 39cb05a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
UV_CACHE_DIR: "/tmp/.uv-cache"
DEFAULT_PYTHON: "3.13"
ALL_PYTHON_VERSIONS: "['3.12', '3.13']"
UV_PROJECT_ENVIRONMENT: "venv"

jobs:
info:
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
id: cache-venv
uses: actions/[email protected]
with:
path: .venv
path: venv
key: ${{ matrix.python-version }}-${{ needs.info.outputs.venv_cache_key_partly }}
restore-keys: ${{ matrix.python-version }}-venv-${{ runner.os }}-
- name: 🏗 Set up uv
Expand All @@ -70,8 +71,9 @@ jobs:
- name: 📦 Build project
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv ${{ env.UV_PROJECT_ENVIRONMENT }}
. venv/bin/activate
uv sync --locked --dev
ls -al .venv/lib/*/site-packages/*
code-quality:
runs-on: "ubuntu-latest"
Expand All @@ -93,24 +95,24 @@ jobs:
id: cache-venv
uses: actions/cache/[email protected]
with:
path: .venv
path: venv
fail-on-cache-miss: true
key: ${{ env.DEFAULT_PYTHON }}-${{ needs.info.outputs.venv_cache_key_partly }}

# Following steps cannot run by pre-commit.ci as repo = local
- name: Run mypy
run: |
. .venv/bin/activate
. venv/bin/activate
mypy deebot_client/
- name: Pylint review
run: |
. .venv/bin/activate
. venv/bin/activate
pylint deebot_client/**/*.py
- name: Verify no getLogger usages
run: |
. .venv/bin/activate
. venv/bin/activate
scripts/check_getLogger.sh
tests:
Expand All @@ -137,15 +139,13 @@ jobs:
id: cache-venv
uses: actions/cache/[email protected]
with:
path: .venv
path: venv
fail-on-cache-miss: true
key: ${{ matrix.python-version }}-${{ needs.info.outputs.venv_cache_key_partly }}

- name: Run pytest
run: |
. .venv/bin/activate
ls -al .venv/lib/*/site-packages/*
ls -al .venv/bin/*
. venv/bin/activate
pytest tests --cov=./ --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
- name: Upload coverage to Codecov
Expand Down

0 comments on commit 39cb05a

Please sign in to comment.