You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the improvement
The current docs suggested the following script to run this tool on CI:
#!/usr/bin/env bash
set -e
BASELINE_BRANCH=${BASELINE_BRANCH:="main"}
# Required for `git switch` on CI
git fetch origin
# Gather baseline perf measurements
git switch "$BASELINE_BRANCH"
yarn install --force
yarn reassure --baseline
# Gather current perf measurements & compare results
git switch --detach -
yarn install --force
yarn reassure
It would be nice to only run the second yarn install --force if the lockfile of the target branch is different from the baseline branch.
Scope of improvement
The CI script
Suggested implementation steps
Maybe hash the lockfile while on the baseline branch and then rehash it after switching to the target branch. Finally compare both hashes and run yarn install --force on the target branch based on the comparison result
The text was updated successfully, but these errors were encountered:
Interesting idea, you are right that yarn install --force is frequently wasteful if yarn did not change. This code is part of the user script (reassure-tests.sh) that each user has to create on the CI. It is also dependent on the package manager used (npm, yarn, pnpm, etc). What we could do in Reassure codebase is to provide a better template that would calculate the hash and run 1st and 2nd install conditionally.
@sbalay Would you be able to investigate such shell script modifications and submit a PR for it?
Describe the improvement
The current docs suggested the following script to run this tool on CI:
It would be nice to only run the second
yarn install --force
if the lockfile of the target branch is different from the baseline branch.Scope of improvement
The CI script
Suggested implementation steps
Maybe hash the lockfile while on the baseline branch and then rehash it after switching to the target branch. Finally compare both hashes and run
yarn install --force
on the target branch based on the comparison resultThe text was updated successfully, but these errors were encountered: