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
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ ADD_LICENSE_HEADER := $(BIN)/license-header \
--year-range "2023-2025"
# This version should be kept in sync with the version in buf.yaml
PROTOVALIDATE_VERSION ?= v0.11.0
# Version of the cel-spec that this implementation is conformant with
# This should be kept in sync with the version in format_test.py
CEL_SPEC_VERSION ?= v0.24.0
TESTDATA_FILE := tests/testdata/string_ext_$(CEL_SPEC_VERSION).textproto

.PHONY: help
help: ## Describe useful make targets
Expand All @@ -36,6 +40,7 @@ generate: $(BIN)/buf $(BIN)/license-header ## Regenerate code and license header
rm -rf gen
$(BIN)/buf generate buf.build/bufbuild/protovalidate:$(PROTOVALIDATE_VERSION)
$(BIN)/buf generate buf.build/bufbuild/protovalidate-testing:$(PROTOVALIDATE_VERSION)
$(BIN)/buf generate buf.build/google/cel-spec:$(CEL_SPEC_VERSION) --exclude-path cel/expr/conformance/proto2 --exclude-path cel/expr/conformance/proto3
$(BIN)/buf generate
$(ADD_LICENSE_HEADER)

Expand All @@ -46,7 +51,7 @@ format: install $(BIN)/license-header ## Format code
pipenv run ruff check --fix protovalidate tests

.PHONY: test
test: generate install ## Run unit tests
test: generate install gettestdata ## Run unit tests
pipenv run pytest

.PHONY: conformance
Expand All @@ -69,6 +74,13 @@ checkgenerate: generate
@# Used in CI to verify that `make generate` doesn't produce a diff.
test -z "$$(git status --porcelain | tee /dev/stderr)"

.PHONY: gettestdata
gettestdata: $(TESTDATA_FILE)

$(TESTDATA_FILE):
mkdir -p $(dir @)
curl -fsSL -o $@ https://raw.githubusercontent.com/google/cel-spec/refs/tags/$(CEL_SPEC_VERSION)/tests/simple/testdata/string_ext.textproto

$(BIN):
@mkdir -p $(BIN)

Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ protobuf = "==6.*"

[dev-packages]
pytest = "*"
pytest-subtests = "*"
mypy = "*"
ruff = "*"
types-protobuf = "==6.30.2.20250503"
Expand Down
105 changes: 61 additions & 44 deletions Pipfile.lock

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

8 changes: 4 additions & 4 deletions buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: 0409229c37804d6187ee0806eb4eebce
digest: b5:795db9d3a6e066dc61d99ac651fa7f136171869abe2211ca272dd84aada7bc4583b9508249fa5b61300a5b1fe8b6dbf6edbc088aa0345d1ccb9fff705e3d48e9
commit: 7712fb530c574b95bc1d57c0877543c3
digest: b5:b3e9c9428384357e3b73e4d5a4614328b0a4b1595b10163bbe9483fa16204749274c41797bd49b0d716479c855aa35c1172a94f471fa120ba8369637fd138829
- name: buf.build/bufbuild/protovalidate-testing
commit: 5acbe1f3c8f24ced9466b9ccccad4cb0
digest: b5:5e9d54d19ce3d9d368f4b1b5ee4f20094d1c33d0f2dca19536339335c2e70d5ffedbd4fa28e290b59ecae0671c9d2dc20b6b8ebba5a9ac76cbf5f9d2af655ef4
commit: 485aa672244b4befa63053fdc75d4a03
digest: b5:82930441f8c3ad186d825d226536baec007b94d23fa974b9905abea7b891a43bd276969d7e8a27453b632cb8b1557079decdd3044306a81de34316d2707089be
Loading
Loading