🔒️(ci) install dependencies without running their setup code

A package could run arbitrary code on the runner while installing,
and the versions were resolved rather than taken from the pins.
The two pip calls now take wheels only, and uv run no longer
resolves an environment of its own.
This commit is contained in:
davd-gzl
2026-08-14 17:54:51 +02:00
committed by aleb_the_flash
parent 80d37595ad
commit 9e2383a341
+10 -10
View File
@@ -33,7 +33,7 @@ jobs:
! git log | grep 'fixup!' ! git log | grep 'fixup!'
- name: Install gitlint - name: Install gitlint
if: always() if: always()
run: pip install --user requests gitlint run: "pip install --user --only-binary=:all: requests==2.34.2 gitlint==0.18.0"
- name: Lint commit messages added to main - name: Lint commit messages added to main
if: always() if: always()
run: ~/.local/bin/gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD run: ~/.local/bin/gitlint --commits origin/${{ github.event.pull_request.base.ref }}..HEAD
@@ -130,11 +130,11 @@ jobs:
run: uv sync --locked --all-extras run: uv sync --locked --all-extras
- name: Check code formatting with ruff - name: Check code formatting with ruff
run: uv run ruff format . --diff run: uv run --no-sync ruff format . --diff
- name: Lint code with ruff - name: Lint code with ruff
run: uv run ruff check . run: uv run --no-sync ruff check .
- name: Lint code with pylint - name: Lint code with pylint
run: uv run pylint meet demo core run: uv run --no-sync pylint meet demo core
lint-agents: lint-agents:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -155,9 +155,9 @@ jobs:
- name: Install the project - name: Install the project
run: uv sync --locked --all-extras run: uv sync --locked --all-extras
- name: Check code formatting with ruff - name: Check code formatting with ruff
run: uv run ruff format . --diff run: uv run --no-sync ruff format . --diff
- name: Lint code with ruff - name: Lint code with ruff
run: uv run ruff check . run: uv run --no-sync ruff check .
lint-summary: lint-summary:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -175,7 +175,7 @@ jobs:
python-version: "3.13" python-version: "3.13"
cache: "pip" cache: "pip"
- name: Install development dependencies - name: Install development dependencies
run: pip install --user .[dev] run: "pip install --user --only-binary=:all: .[dev]"
- name: Check code formatting with ruff - name: Check code formatting with ruff
run: ~/.local/bin/ruff format . --diff run: ~/.local/bin/ruff format . --diff
- name: Lint code with ruff - name: Lint code with ruff
@@ -291,10 +291,10 @@ jobs:
sudo apt-get install -y gettext sudo apt-get install -y gettext
- name: Generate a MO file from strings extracted from the project - name: Generate a MO file from strings extracted from the project
run: uv run python manage.py compilemessages run: uv run --no-sync python manage.py compilemessages
- name: Run tests - name: Run tests
run: uv run pytest -n 2 run: uv run --no-sync pytest -n 2
test-summary: test-summary:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -334,7 +334,7 @@ jobs:
cache: "pip" cache: "pip"
- name: Install development dependencies - name: Install development dependencies
run: pip install --user .[dev] run: "pip install --user --only-binary=:all: .[dev]"
- name: Run summary tests - name: Run summary tests
run: ~/.local/bin/pytest run: ~/.local/bin/pytest