Skip to content

Commit ae356b7

Browse files
ci: only show benchmarks for last 365 days, fix #1767 [ci-bench] (#1771)
(instead of 3.2 years) Fix #1767 Tested in my fork
1 parent f6286e3 commit ae356b7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,10 @@ jobs:
362362

363363
- name: Write benchmark HTML
364364
shell: bash
365-
run: node --input-type=module -e "$(curl -sSL https://raw.githubusercontent.com/benchmark-action/github-action-benchmark/master/src/default_index_html.ts) console.log(DEFAULT_INDEX_HTML)" > "$WWW_DIR/bench/index.html"
365+
run: |
366+
node --input-type=module -e "$(curl -sSL https://raw.githubusercontent.com/benchmark-action/github-action-benchmark/master/src/default_index_html.ts) console.log(DEFAULT_INDEX_HTML)" > "$WWW_DIR/bench/index.html"
367+
sed -i '/ const data = window.BENCHMARK_DATA;/a\
368+
data.entries.Benchmark = data.entries.Benchmark.slice(-365)' "$WWW_DIR/bench/index.html"
366369
367370
- name: Push to gh-pages
368371
# Do not deploy PRs, only benchmark main branch.

0 commit comments

Comments
 (0)