From fac56f39c8335e2db591587ccbefc3a3462bf6d0 Mon Sep 17 00:00:00 2001 From: Mihai Date: Mon, 4 Mar 2024 22:00:30 -0500 Subject: [PATCH] activate venv at very step in CI --- .github/workflows/lint.yml | 5 ++++- .github/workflows/static.yml | 4 +++- .github/workflows/test.yml | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 68d40a5ee4..c544110741 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -34,7 +34,9 @@ jobs: uv pip install --upgrade -r requirements-dev.txt - name: run black - run: python -m black --config pyproject.toml --check --diff . + run: | + source .venv/bin/activate + python -m black --config pyproject.toml --check --diff . - name: get all Python files id: list_files @@ -43,6 +45,7 @@ jobs: - name: run Pylint on files run: | + source .venv/bin/activate files="${{ steps.list_files.outputs.files }}" if [ -n "$files" ]; then pylint --rcfile=.pylintrc $files diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index db56999807..fb0744ef9b 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -34,4 +34,6 @@ jobs: uv pip install --upgrade -r requirements-dev.txt - name: analysing code with pyright - run: python -m pyright $(git ls-files '*.py' '*.pyi') + run: | + source .venv/bin/activate + python -m pyright $(git ls-files '*.py' '*.pyi') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6127c26cc7..04ae341324 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,10 +54,12 @@ jobs: - name: run pytest with coverage run: | + source .venv/bin/activate IN_CI=true coverage run -m pytest - name: generate coverage report run: | + source .venv/bin/activate coverage xml -i coverage html -i