Fix CI: use venv to avoid PEP 668 externally-managed-environment error
CI / lint-and-test (push) Successful in 1m21s
CI / lint-and-test (push) Successful in 1m21s
This commit is contained in:
+15
-7
@@ -18,20 +18,28 @@ jobs:
|
||||
|
||||
- name: Set up Python
|
||||
run: |
|
||||
apt-get update && apt-get install -y python3 python3-pip python3-venv || true
|
||||
apt-get update && apt-get install -y python3 python3-venv || true
|
||||
python3 --version
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 -m pip install -r requirements-dev.txt
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements-dev.txt
|
||||
|
||||
- name: Lint with ruff
|
||||
run: python3 -m ruff check .
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
ruff check .
|
||||
|
||||
- name: Format check with ruff
|
||||
run: python3 -m ruff format --check .
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
ruff format --check .
|
||||
|
||||
- name: Run tests
|
||||
run: python3 -m pytest -q
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
pytest -q
|
||||
|
||||
Reference in New Issue
Block a user