Skip to content

fix: Query assistant doesn't refresh generated ppl #267

fix: Query assistant doesn't refresh generated ppl

fix: Query assistant doesn't refresh generated ppl #267

name: Performance Testing
on:
pull_request:
branches:
- main
paths-ignore:
- '**/*.md' # Ignore documentation files
- '**/*.test.ts' # Ignore test files (TypeScript)
- '**/*.test.js' # Ignore test files (JavaScript)
- '**/__tests__/**' # Ignore test directories
- '.github/workflows/**' # Ignore GitHub workflow files
- 'docs/**' # Ignore entire docs directory
permissions:
contents: read
issues: write
pull-requests: write
jobs:
bundle-analyzer:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g yarn@1.22.10
- name: Run bootstrap
# Install dependencies and bootstrap the OpenSearch Dashboards project
run: yarn osd bootstrap
- name: Build plugins
# Build OpenSearch Dashboards platform plugins without examples using 12 workers
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12
- name: Update Limit and bundle size variation
# This command updates the limit and bundle size variation for the OpenSearch Dashboards platform plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --update-limits
- name: Read and comment bundle size variations
run: |
if [ -f packages/osd-optimizer/limits_delta.yml ]; then
echo "📊 **Bundle Size crossed 5% for below plugins**" > comment.txt
echo "" >> comment.txt
cat packages/osd-optimizer/limits_delta.yml >> comment.txt
gh pr comment ${{ github.event.pull_request.number }} --body "$(cat comment.txt)"
else
echo "No bundle size variations detected, skipping comment."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}