benchmark-action / benchmark-action/github-action-benchmark

[Question/Idea] Is it possible to use gh-page data.js content as cached value?

Open
#199 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

I would like to compare the PR's benchmark with the master one,

My ideia is: instead use a cache, to try something with:

```
- name: Get previous benchmark data
run: |
echo "Fetching gh-pages branch"
git fetch origin gh-pages

echo "Checking out gh-pages branch"
git checkout gh-pages

if [ ! -d "./cache" ]; then
echo "Cache folder does not exist, creating it"
mkdir ./cache
fi

echo "Copying data file from gh-pages to cache"
cp ./dev/bench/data.js ./cache/data.js || { echo "Failed to copy data file" ; exit 1; }

echo "Checking out main branch"
git checkout -
```

an then run the benchmark action with minimal setup, using this content as the json external file.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.