Skip to content

Commit 7deb443

Browse files
committed
minimal examples test
Signed-off-by: Filinto Duran <[email protected]>
1 parent b12c044 commit 7deb443

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2025 The Dapr Authors
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
14+
set -Eeuo pipefail
15+
trap 'exit 1' ERR
16+
17+
## Activity Sequence
18+
python activity_sequence.py > activity_output
19+
grep "Hello Tokyo!" activity_output
20+
21+
22+
## Fan Out/Fan In
23+
python fanout_fanin.py > fanout_fanin_output
24+
grep "Orchestration completed! Result" fanout_fanin_output
25+
26+
## Wait for Event
27+
{ sleep 2; printf '\n'; } | python human_interaction.py --timeout 20 --approver PYTHON-CI > human_interaction_ouptput
28+
grep "Orchestration completed! Result: \"Approved by 'PYTHON-CI'\"" human_interaction_ouptput
29+
30+

0 commit comments

Comments
 (0)