Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ jobs:
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
cache-dependency-glob: "uv.lock"
cache-dependency-glob: 'uv.lock'

- name: Install Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Python dependencies
# We want to install all groups here to make sure that deptry has access to all dependencies for the inspection,
# even development ones.
run: uv sync --frozen

- name: Setup Rust toolchain
Expand All @@ -55,6 +57,8 @@ jobs:
env:
# renovate: datasource=pypi depName=pre-commit
PRE_COMMIT_VERSION: '4.3.0'
# Skip mypy hook, as mypy is run in "tests" job.
SKIP: mypy

- name: Inspect dependencies with deptry
run: uv run deptry python
Expand Down Expand Up @@ -90,7 +94,7 @@ jobs:
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
cache-dependency-glob: "uv.lock"
cache-dependency-glob: 'uv.lock'
cache-suffix: ${{ matrix.python-version }}

- name: Install Python
Expand All @@ -99,17 +103,17 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Python dependencies
run: uv sync --frozen --group test --group typing
run: uv sync --frozen --no-default-groups --group test --group typing

- name: Check typing
run: uv run mypy
run: uv run --no-default-groups mypy
if: ${{ matrix.os.name == 'linux' }}

- name: Run unit tests
run: uv run pytest tests/unit --cov --cov-config=pyproject.toml --cov-report=xml
run: uv run --no-default-groups pytest tests/unit --cov --cov-config=pyproject.toml --cov-report=xml

- name: Run functional tests
run: uv run pytest tests/functional -n auto --dist loadgroup
run: uv run --no-default-groups pytest tests/functional -n auto --dist loadgroup
env:
PYTHONIOENCODING: 'utf-8'

Expand All @@ -132,7 +136,7 @@ jobs:
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
cache-dependency-glob: "uv.lock"
cache-dependency-glob: 'uv.lock'

- name: Install Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ jobs:
with:
version: ${{ env.UV_VERSION }}
enable-cache: true
cache-dependency-glob: "uv.lock"
cache-dependency-glob: 'uv.lock'

- name: Install Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-codecov-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: validate-codecov-config
on:
pull_request:
paths:
- ".github/workflows/validate-codecov-config.yml"
- "codecov.yaml"
- '.github/workflows/validate-codecov-config.yml'
- 'codecov.yaml'
push:
branches: [main]

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/validate-renovate-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: validate-renovate-config
on:
pull_request:
paths:
- ".github/workflows/validate-renovate-config.yml"
- ".github/renovate.json5"
- '.github/workflows/validate-renovate-config.yml'
- '.github/renovate.json5'
push:
branches: [main]

env:
# renovate: datasource=node depName=node versioning=node
NODE_VERSION: "24"
NODE_VERSION: '24'

permissions: {}

Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ repos:
args: [--exit-non-zero-on-fix]
- id: ruff-format

- repo: local
hooks:
- id: mypy
name: mypy
exclude: ^tests/fixtures
entry: uv run mypy
language: system
types: [python]
require_serial: true

- repo: https://github.com/astral-sh/uv-pre-commit
rev: "0.9.8"
hooks:
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ install: ## Install the uv environment.
check: ## Run code quality tools.
@echo "🚀 Linting code: Running pre-commit"
@pre-commit run -a
@echo "🚀 Static type checking: Running mypy"
@uv run mypy
@echo "🚀 Checking for dependency issues: Running deptry"
@uv run deptry python

Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ changelog = "https://github.com/fpgmaas/deptry/blob/main/CHANGELOG.md"
deptry = "deptry.cli:deptry"

[tool.uv]
# Incompatibility between Poetry (requiring < 0.7.0) and PDM (requiring >= 0.7.0).
override-dependencies = ["findpython==0.7.0"]
default-groups = "all"

[build-system]
requires = ["maturin>=1.5,<2.0"]
Expand Down
3 changes: 0 additions & 3 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.