Skip to content

perf: remove policies live merge from Search getSections (S3 #2590) #144

perf: remove policies live merge from Search getSections (S3 #2590)

perf: remove policies live merge from Search getSections (S3 #2590) #144

name: Reassure Performance Tests
on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths-ignore: [docs/**, help/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh']
jobs:
baseline-perf-tests:
if: ${{ github.actor != 'OSBotify' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout baseline branch
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
- name: Checkout baseline branch
shell: bash
run: |
set -e
BASELINE_BRANCH=${BASELINE_BRANCH:="main"}
git fetch origin "$BASELINE_BRANCH" --no-tags
git checkout --force --detach "origin/$BASELINE_BRANCH" --no-recurse-submodules
- name: Setup NodeJS
uses: ./.github/actions/composite/setupNode
- name: Run baseline performance tests
shell: bash
run: NODE_OPTIONS=--experimental-vm-modules npx reassure --baseline
- name: Upload baseline performance results
# v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: reassure-baseline-results
path: ./.reassure/baseline.perf
include-hidden-files: true
branch-perf-tests:
if: ${{ github.actor != 'OSBotify' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
- name: Setup NodeJS
uses: ./.github/actions/composite/setupNode
- name: Run branch performance tests
shell: bash
env:
BRANCH: ${{ github.head_ref }}
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
run: NODE_OPTIONS=--experimental-vm-modules npx reassure --branch="$BRANCH" --commit-hash="$COMMIT_HASH" --no-compare
- name: Upload branch performance results
# v6
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: reassure-branch-results
path: ./.reassure/current.perf
include-hidden-files: true
validate-perf-tests:
if: ${{ github.actor != 'OSBotify' }}
runs-on: blacksmith-4vcpu-ubuntu-2404
needs: [baseline-perf-tests, branch-perf-tests]
steps:
- name: Checkout
uses: useblacksmith/checkout@c9796daa2a4bdebdab5bd16be2c09a70cd4e1121 # v1
- name: Setup NodeJS
uses: ./.github/actions/composite/setupNode
- name: Download baseline performance results
# v7
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: reassure-baseline-results
path: ./.reassure
- name: Download branch performance results
# v7
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: reassure-branch-results
path: ./.reassure
- name: Compare performance results
run: node -e "require('@callstack/reassure-compare').compare().catch((error) => { console.error(error); process.exit(1); })"
- name: Validate output.json
id: validateReassureOutput
uses: ./.github/actions/javascript/validateReassureOutput
with:
DURATION_DEVIATION_PERCENTAGE: 20
COUNT_DEVIATION: 0