From 90cb4c244f0246db2187551457a1c7fe3fba57b1 Mon Sep 17 00:00:00 2001 From: Julien Maupetit Date: Mon, 25 Nov 2024 21:55:56 +0100 Subject: [PATCH] fixup! CI message first test --- .github/workflows/api.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index e6038ed5..1ff44590 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -143,13 +143,21 @@ jobs: python ../bench/cli.py \ stamp bench_admin_stats.csv $(git rev-parse --short "${GITHUB_SHA}") \ > bench_admin_stats_stamped.csv + # TODO + # + # Add markdown header + # explain that it's a diff: what a negative value means? - name: Generate markdown table run: | + echo -e "### Current benchmark\n" >> bench_admin_stats.md && \ + pipenv run csvlook -I bench_admin_stats_stamped.csv >> bench_admin_stats.md && \ + echo -e "### Comparisition with the latest previous benchmark\n" >> bench_admin_stats.md && \ + echo "> A negative value means the current version performs better than the previous one." pipenv run \ python ../bench/cli.py diff ../../data/bench.csv bench_admin_stats_stamped.csv | \ pipenv run \ - csvlook > bench_admin_stats_diff.md - cat bench_admin_stats_diff.md + csvlook -I >> bench_admin_stats.md + cat bench_admin_stats.md # TODO # - Save the csv file as artefact # - Improve readFile PATH @@ -157,7 +165,7 @@ jobs: with: script: | const fs = require('node:fs'); - fs.readFile('/home/runner/work/qualicharge/qualicharge/src/api/bench_admin_stats_diff.md', 'utf8', (err, data) => { + fs.readFile('/home/runner/work/qualicharge/qualicharge/src/api/bench_admin_stats.md', 'utf8', (err, data) => { if (err) { console.error(err); return;