forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ on: | |
types: [opened, synchronize] | ||
branches-ignore: [staging, production] | ||
paths-ignore: [docs/**, .github/**, contributingGuides/**, tests/**, workflow_tests/**, '**.md', '**.sh'] | ||
|
||
jobs: | ||
perf-tests: | ||
if: ${{ github.actor != 'OSBotify' }} | ||
|
@@ -21,56 +20,28 @@ jobs: | |
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Test" | ||
- name: Run performance testing script | ||
shell: bash | ||
run: | | ||
set -e | ||
BASELINE_BRANCH=${BASELINE_BRANCH:="main"} | ||
git fetch origin "$BASELINE_BRANCH" --no-tags --depth=1 | ||
git switch "$BASELINE_BRANCH" | ||
# Clear node_modules and reinstall dependencies | ||
rm -rf node_modules | ||
npm install --force | ||
# Check if the patch files exist and apply them | ||
if [ -d "patches" ]; then | ||
for file in patches/*.patch; do | ||
if [ -e "$file" ]; then | ||
npx patch-package `basename $file | sed -e 's/+[0-9]*+.*.patch$//'` | ||
fi | ||
done | ||
fi | ||
npx reassure --baseline | ||
git switch --force --detach - | ||
git merge --no-commit --allow-unrelated-histories "$BASELINE_BRANCH" -X ours | ||
# Repeat clearing node_modules and reinstalling for the feature branch | ||
rm -rf node_modules | ||
npm install --force | ||
if [ -d "patches" ]; then | ||
for file in patches/*.patch; do | ||
if [ -e "$file" ]; then | ||
npx patch-package `basename $file | sed -e 's/+[0-9]*+.*.patch$//'` | ||
fi | ||
done | ||
fi | ||
npx reassure --branch | ||
- name: Read output.json | ||
id: reassure | ||
uses: juliangruber/read-file-action@v1 | ||
with: | ||
path: .reassure/output.json | ||
|
||
- name: Validate output.json | ||
id: validateReassureOutput | ||
uses: ./.github/actions/javascript/validateReassureOutput | ||
with: | ||
DURATION_DEVIATION_PERCENTAGE: 20 | ||
COUNT_DEVIATION: 0 | ||
REGRESSION_OUTPUT: ${{ steps.reassure.outputs.content }} | ||
REGRESSION_OUTPUT: ${{ steps.reassure.outputs.content }} |