try activating virtualenv #1478
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code quality | |
on: | |
push: | |
pull_request: | |
env: | |
UV_PYTHON_PREFERENCE: only-system | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
env: | |
DJANGO_CA_SECRET_KEY: dummy | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v4.1.1 | |
- name: Setup Python | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: "3.13" | |
architecture: x64 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
- name: Install dependencies | |
run: uv sync --no-group local | |
- name: Activate virtualenv | |
run: | | |
. .venv/bin/activate | |
echo PATH=$PATH >> $GITHUB_ENV | |
- name: Run ruff | |
run: python dev.py code-quality | |
# Will show outdated dependencies, etc | |
- name: Validate state | |
run: python dev.py validate state | |
- name: Check license headers | |
run: python dev.py validate license-headers | |
- name: Validate sdist/wheel | |
run: | | |
python -m build | |
twine check --strict dist/* | |
- name: Run pylint | |
run: pylint --verbose ca/django_ca/ ca/ca/ docs/source/django_ca_sphinx/ devscripts/ |