Skip to content

Commit 5d6f459

Browse files
committed
feedback, simple test on examples
Signed-off-by: Filinto Duran <[email protected]>
1 parent 4f9855d commit 5d6f459

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

.github/workflows/pr-validation.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ jobs:
4747
go install github.com/dapr/durabletask-go@main
4848
durabletask-go --port 4001 &
4949
tox -e py${{ matrix.python-version }}-e2e
50+
- name: Run examples
51+
run: |
52+
cd examples
53+
durabletask-go --port 4001 &
54+
./tests.sh
5055
publish:
5156
needs: build
5257
if: startswith(github.ref, 'refs/tags/v')

examples/tests.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -Eeuo pipefail
4+
trap 'exit 1' ERR
5+
6+
## Activity Sequence
7+
python activity_sequence.py > activity_output
8+
grep "Hello Tokyo!" activity_output
9+
10+
11+
## Fan Out/Fan In
12+
python fanout_fanin.py > fanout_fanin_output
13+
grep "Orchestration completed! Result" fanout_fanin_output
14+
15+
## Wait for Event
16+
{ sleep 2; printf '\n'; } | python human_interaction.py --timeout 20 --approver PYTHON-CI > human_interaction_ouptput
17+
grep "Orchestration completed! Result: \"Approved by 'PYTHON-CI'\"" human_interaction_ouptput
18+
19+

tests/durabletask/test_serialization.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
"""
2+
Copyright 2025 The Dapr Authors
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
"""
13+
114
from collections import namedtuple
215
from dataclasses import dataclass
316
from types import SimpleNamespace

0 commit comments

Comments
 (0)