File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -279,8 +279,15 @@ jobs:
279279 run : uv python install 3.12
280280 - name : Install dependencies
281281 run : uv sync --locked --all-groups --all-extras
282+ - name : Fetch pull request base for the new-duplicate check
283+ if : github.event_name == 'pull_request' || github.event_name == 'merge_group'
284+ run : git fetch --no-tags --depth=1 origin "$BASE_SHA"
285+ env :
286+ BASE_SHA : ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}
282287 - name : Run static checks
283288 run : make check-ci
289+ env :
290+ DUPES_BASE : ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || 'origin/main' }}
284291 - name : Run native checks
285292 run : make rust-check
286293 - name : Run unit and integration tests
Original file line number Diff line number Diff line change 11SHELL := /bin/bash
22
3- .PHONY : verify verify-quick verify-pg coverage cli-preview rust-check check-native-layering check-native-stub check-build-features check-python-boundary check-release-gate check-docs-skill \
3+ .PHONY : verify verify-quick verify-pg coverage cli-preview rust-check check-native-layering check-dupes-new check- native-stub check-build-features check-python-boundary check-release-gate check-docs-skill \
44 check-e2e-shards test-e2e-duckdb test-e2e-duckdb-build-core \
55 test-e2e-duckdb-build-incremental \
66 test-e2e-duckdb-cli-data test-e2e-duckdb-cli test-e2e-duckdb-inspection \
@@ -562,6 +562,22 @@ dupes:
562562 uv run fensu dupes
563563
564564
565+ # Warn mode: report new duplicated code since DUPES_BASE without failing the build.
566+ DUPES_BASE ?= origin/main
567+
568+ check-dupes-new :
569+ @if ! git rev-parse --verify --quiet " $( DUPES_BASE) ^{commit}" > /dev/null; then \
570+ echo " warning: skipped new-duplicate check: base $( DUPES_BASE) is not available" ; \
571+ exit 0; \
572+ fi ; \
573+ uv run fensu dupes --since " $( DUPES_BASE) " --fail-on-new; rc=$$? ; \
574+ if [ $$ rc -eq 1 ]; then \
575+ echo " warning: new duplicated code above (warn mode: this check does not fail yet)" ; \
576+ elif [ $$ rc -ne 0 ]; then \
577+ exit $$ rc; \
578+ fi
579+
580+
565581check :
566582 uv run ruff format .
567583 uv run ruff check --fix .
@@ -671,7 +687,7 @@ verify-quick:
671687 exit $$ status
672688
673689
674- check-ci : check-e2e-shards check-native-layering check-native-stub check-build-features check-python-boundary check-release-gate check-docs-skill rust-lint
690+ check-ci : check-dupes-new check- e2e-shards check-native-layering check-native-stub check-build-features check-python-boundary check-release-gate check-docs-skill rust-lint
675691 uv run ruff format --check .
676692 uv run ruff check .
677693 uv run ty check src tests
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ dev = [
8181 " pytest-cov>=7.0.0" ,
8282 " pytest-xdist>=3.8.0" ,
8383 " ruff>=0.12.0" ,
84- " fensu>=0.28.3 " ,
84+ " fensu>=0.29.0 " ,
8585 " testcontainers>=4.8.1" ,
8686 " ty>=0.0.1a19" ,
8787]
You can’t perform that action at this time.
0 commit comments