Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain visible content position gh actions #19

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 1 addition & 30 deletions .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand All @@ -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 }}
Loading