Skip to content

Commit 400dd88

Browse files
committed
Report the reported JSON to output
It's only a few lines, and can be _very_ helpful to understand & debug failures
1 parent b2c7bb6 commit 400dd88

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/test.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,20 +56,25 @@ jobs:
5656
touch ./webui/dist/index.html
5757
time_out=$(mktemp)
5858
bench_report=$(mktemp)
59-
/usr/bin/time -o "$time_out" make test
60-
jq -n -R < "$time_out" 'reduce (inputs | split(" ")) as $kv ({}; .[$kv[0]] = {value: $kv[1]}) | {"test-go-runtime": .}' > "$bench_report"
61-
echo BENCH_REPORT=$(echo "$bench_report") >> $GITHUB_ENV
59+
/usr/bin/time -p -o "$time_out" make test
60+
jq -n -R < "$time_out" 'reduce (inputs | split(" ")) as $kv ({}; .[$kv[0]] = {value: ($kv[1] | tonumber}) | {"test-go-runtime": .}' > "$bench_report"
61+
echo bench_report=$(echo "$bench_report") >> $GITHUB_ENV
6262
- name: Report times to Bencher
6363
# OK to fail here, it's just a bencher report
6464
continue-on-error: true
6565
run: |
66-
bench_report=${{env.BENCH_REPORT}}
6766
ref=${{github.ref_name}}
6867
release_slug=$(uname -s -m | tr '[:upper:]' '[:lower:]' | sed 's/[ _]/-/g')
6968
gh release download --skip-existing -O ./bencher -p '*linux-x86-64' -R bencherdev/bencher v0.5.8
7069
chmod +x ./bencher
7170
./bencher run --adapter json \
72-
--file=${bench_report} \
73-
--project lakeFS \
71+
--file="${bench_report}" \
72+
--project lakefs \
7473
--branch "$ref" \
7574
--testbed "github-${release_slug}"
75+
env:
76+
GH_TOKEN: ${{ github.token }}
77+
- name: What we reported
78+
continue-on-error: true
79+
run: |
80+
cat "${bench_report}"

0 commit comments

Comments
 (0)