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
32 changes: 18 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

jobs:
build:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -57,6 +57,8 @@ jobs:

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
Expand All @@ -73,28 +75,28 @@ jobs:
if: startsWith(matrix.os, 'ubuntu-')
run: uv run poe lint

- name: check running generate does not create a diff
# NOTE: running on macOS as our sed command only works there
# We expect uv.lock to change when matrix.resolution == "lowest-direct", so we don't check it there.
if: ${{ startsWith(matrix.os, 'macos-') && matrix.resolution == 'highest' }}
run: uv run poe checkgenerate
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}

- name: run python tests
run: uv run poe test ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}

- name: run conformance tests
# TODO: Debug stdin/stdout issues on Windows
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: uv run poe test-conformance ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}

- name: run OTel tests
run: uv run poe test-otel ${{ matrix.coverage == 'cov' && '--cov=connectrpc_otel --cov-report=xml' || '' }}

- name: run Go tests
run: go test ./...
working-directory: protoc-gen-connect-python

- name: check running generate does not create a diff
# NOTE: running on macOS as our sed command only works there
# We expect uv.lock to change when matrix.resolution == "lowest-direct", so we don't check it there.
if: ${{ startsWith(matrix.os, 'macos-') && matrix.resolution == 'highest' }}
run: uv run poe checkgenerate
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
- name: run conformance tests
# TODO: Debug stdin/stdout issues on Windows
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: uv run poe test-conformance ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}

- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
if: ${{ matrix.coverage == 'cov' }}
Expand All @@ -103,9 +105,11 @@ jobs:

publish:
runs-on: ubuntu-24.04
needs: build
needs: ci
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0

Expand Down
12 changes: 5 additions & 7 deletions poe_tasks.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#:schema https://json.schemastore.org/partial-poe.json

[env]
BUF_VERSION = "v1.67.0"

[tasks.bump]
help = "Bump the project version"
sequence = [
Expand Down Expand Up @@ -58,29 +55,30 @@ sequence = [
"generate-example",
"generate-status",
"generate-test",
{ cmd = "go mod tidy", cwd = "protoc-gen-connect-python" },
"format",
]

[tasks.generate-conformance]
help = "Generate conformance files"
sequence = [
{ cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" },
{ cmd = "buf generate" },
{ shell = "find test/gen -type f -exec sed -i '' 's/from connectrpc.conformance.v1/from gen.connectrpc.conformance.v1/' {} +", env = { "LC_ALL" = "c" } },
]
cwd = "conformance"

[tasks.generate-example]
help = "Generate example files"
cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate"
cmd = "buf generate"
cwd = "example"

[tasks.generate-status]
help = "Generate gRPC status"
cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate"
cmd = "buf generate"

[tasks.generate-test]
help = "Generate test files"
cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate"
cmd = "buf generate"
cwd = "test"

[tasks.lint]
Expand Down
2 changes: 1 addition & 1 deletion protoc-gen-connect-python/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/connectrpc/connect-python/protoc-gen-connect-python
go 1.25.7

require (
github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1
github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b
google.golang.org/protobuf v1.36.11
)
4 changes: 2 additions & 2 deletions protoc-gen-connect-python/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw=
github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c=
github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 h1:V1xulAoqLqVg44rY97xOR+mQpD2N+GzhMHVwJ030WEU=
github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ=
github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b h1:b7wvo9ZhjLzCp7tGbOUMvgtYTnd33zGSAmMxcdxMnhQ=
github.com/bufbuild/protoplugin v0.0.0-20260414125817-25d1d281b46b/go.mod h1:c5D8gWRIZ2HLWO3gXYTtUfw/hbJyD8xikv2ooPxnklQ=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dev = [
"Twisted[tls,http2]==25.5.0",
"asgiref==3.11.1",
"brotli==1.2.0",
"buf-bin==1.68.3",
"connect-python-example",
"daphne==4.2.1",
"granian==2.7.3",
Expand Down
25 changes: 22 additions & 3 deletions uv.lock

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

Loading