Skip to content

Commit 3942c81

Browse files
authored
[action]: added status field based on message frequency;
1 parent 599372f commit 3942c81

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/run-the-echosystem.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,37 @@ jobs:
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
15+
1516
- name: Run docker compose
1617
run: |
1718
docker compose up -d
19+
1820
- name: Shutdown after 3 minutes
1921
run: |
2022
sleep 180
2123
docker compose logs > logs.txt
24+
2225
- name: Upload logs
2326
uses: actions/upload-artifact@v4
2427
if: always()
2528
with:
2629
name: fluid-builder-compose-logs
2730
path: logs.txt
31+
2832
- name: Count messages received
2933
run: |
3034
awk '
3135
/example-receive[[:space:]]*\|[[:space:]]*1-Received:/ {c1++}
3236
/example-receive[[:space:]]*\|[[:space:]]*2-Received:/ {c2++}
3337
/example-receive[[:space:]]*\|[[:space:]]*3-Received:/ {c3++}
3438
END {
35-
printf "%-30s | %s\n", "Pattern", "Count"
36-
printf "%-30s | %d\n", "example-receive | 1-Received:", c1+0
37-
printf "%-30s | %d\n", "example-receive | 2-Received:", c2+0
38-
printf "%-30s | %d\n", "example-receive | 3-Received:", c3+0
39+
printf "%-30s | %-5s | %-6s\n", "Pattern", "Count", "Status"
40+
printf "%-30s | %-5d | %-6s\n", "example-receive | 1-Received:", c1+0, (c1 == 1000 ? "✅" : "❌")
41+
printf "%-30s | %-5d | %-6s\n", "example-receive | 2-Received:", c2+0, (c2 == 1000 ? "✅" : "❌")
42+
printf "%-30s | %-5d | %-6s\n", "example-receive | 3-Received:", c3+0, (c3 == 1000 ? "✅" : "❌")
3943
}
4044
' logs.txt
45+
4146
- name: Stop and remove containers
4247
run: |
43-
docker compose down -v
48+
docker compose down -v

0 commit comments

Comments
 (0)