Skip to content

Commit 98ca7a8

Browse files
committed
delete "Publish combined test summary table"
1 parent b3fe084 commit 98ca7a8

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -70,68 +70,6 @@ jobs:
7070
--results-directory "$PWD"
7171
continue-on-error: true
7272

73-
- name: Publish combined test summary table
74-
if: always()
75-
run: |
76-
echo '| Test Suite | ✓ Passed | ✗ Failed | ↻ Skipped | ∑ Total | ⏱ Elapsed |' >> "$GITHUB_STEP_SUMMARY"
77-
echo '|:---------- | -------: | -------: | --------: | ------: | --------: |' >> "$GITHUB_STEP_SUMMARY"
78-
79-
iso_to_epoch() {
80-
local ts="$1"
81-
ts="${ts%%.*}"
82-
ts="${ts%Z}"
83-
ts=$(echo "$ts" | sed -E 's/[+-][0-9]{2}:[0-9]{2}$//')
84-
date -u -d "$ts" +%s 2>/dev/null || echo ""
85-
}
86-
87-
summarize() {
88-
local name="$1"; local expected="$2"
89-
local path="$expected"
90-
[ ! -f "$path" ] && path=$(find "$(dirname "$expected")" -maxdepth 3 -name '*.trx' -print -quit)
91-
92-
if [ -f "$path" ]; then
93-
local passed failed total executed skipped duration
94-
passed=$(grep -oP 'passed="\K\d+' "$path" | head -1 || echo 0)
95-
failed=$(grep -oP 'failed="\K\d+' "$path" | head -1 || echo 0)
96-
total=$(grep -oP 'total="\K\d+' "$path" | head -1 || echo 0)
97-
executed=$(grep -oP 'executed="\K\d+' "$path" | head -1 || echo 0)
98-
[ -z "$executed" ] && executed=$((passed+failed))
99-
skipped=$((total-executed))
100-
101-
duration=$(grep -oP 'duration="\K[0-9\.]+' "$path" | head -1)
102-
103-
if [ -z "$duration" ]; then
104-
local rd h m s
105-
rd=$(grep -oP 'runDuration="\K[0-9:.]+' "$path" | head -1)
106-
if [ -n "$rd" ]; then
107-
IFS=: read -r h m s <<<"${rd%%.*}"
108-
duration=$((10#$h*3600 + 10#$m*60 + 10#$s))
109-
fi
110-
fi
111-
112-
if [ -z "$duration" ]; then
113-
local start finish ds df
114-
start=$(grep -oP '<Times[^>]*start="\K[^"]+' "$path" | head -1)
115-
finish=$(grep -oP '<Times[^>]*finish="\K[^"]+' "$path" | head -1)
116-
if [ -n "$start" ] && [ -n "$finish" ]; then
117-
ds=$(iso_to_epoch "$start")
118-
df=$(iso_to_epoch "$finish")
119-
[ -n "$ds" ] && [ -n "$df" ] && duration=$((df-ds))
120-
fi
121-
fi
122-
[ -z "$duration" ] && duration='-'
123-
124-
echo "| $name | $passed | $failed | $skipped | $total | ${duration}s |" >> "$GITHUB_STEP_SUMMARY"
125-
else
126-
echo "| $name | N/A | N/A | N/A | N/A | N/A |" >> "$GITHUB_STEP_SUMMARY"
127-
fi
128-
}
129-
130-
summarize 'ADO.NET' './src/Ydb.Sdk/test/Ydb.Sdk.Ado.Tests/ado.trx'
131-
summarize 'Specification' './src/Ydb.Sdk/test/Ydb.Sdk.Ado.Specification.Tests/spec.trx'
132-
summarize 'Dapper' './src/Ydb.Sdk/test/Ydb.Sdk.Ado.Dapper.Tests/dapper.trx'
133-
summarize 'Topic' './src/Ydb.Sdk/test/Ydb.Sdk.Topic.Tests/topic.trx'
134-
13573
run-examples:
13674
runs-on: ubuntu-22.04
13775
strategy:

0 commit comments

Comments
 (0)