Skip to content

Commit

Permalink
fixup! CI message first test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaupetit committed Nov 25, 2024
1 parent 7a2eb71 commit 90cb4c2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,21 +143,29 @@ 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
- uses: actions/github-script@v7
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;
Expand Down

0 comments on commit 90cb4c2

Please sign in to comment.