[REF-2895]Benchmarks getting skipped on merge (#3369)

This commit is contained in:
Elijah Ahianyo 2024-05-29 09:28:41 -07:00 committed by GitHub
parent 93de407007
commit 4b939caa7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -23,7 +23,7 @@ env:
jobs: jobs:
reflex-web: reflex-web:
if: github.event.pull_request.merged == true # if: github.event.pull_request.merged == true
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@ -100,7 +100,7 @@ jobs:
npm -v npm -v
poetry run bash scripts/integration.sh ./reflex-examples/counter dev poetry run bash scripts/integration.sh ./reflex-examples/counter dev
- name: Measure and upload .web size - name: Measure and upload .web size
if: ${{ env.DATABASE_URL && github.event.pull_request.merged == true }} if: ${{ env.DATABASE_URL}}
run: run:
poetry run python scripts/benchmarks/benchmark_reflex_size.py --os "${{ matrix.os }}" poetry run python scripts/benchmarks/benchmark_reflex_size.py --os "${{ matrix.os }}"
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
@ -108,14 +108,12 @@ jobs:
--branch-name "${{ github.head_ref || github.ref_name }}" --branch-name "${{ github.head_ref || github.ref_name }}"
--measurement-type "counter-app-dot-web" --path ./reflex-examples/counter/.web --measurement-type "counter-app-dot-web" --path ./reflex-examples/counter/.web
- name: Install hyperfine - name: Install hyperfine
if: github.event.pull_request.merged == true run: cargo install hyperfine
run: cargo install --locked hyperfine
- name: Benchmark imports - name: Benchmark imports
if: github.event.pull_request.merged == true
working-directory: ./reflex-examples/counter working-directory: ./reflex-examples/counter
run: hyperfine --warmup 3 "export POETRY_VIRTUALENVS_PATH=../../.venv; poetry run python counter/counter.py" --show-output --export-json "${{ env.OUTPUT_FILE }}" --shell bash run: hyperfine --warmup 3 "export POETRY_VIRTUALENVS_PATH=../../.venv; poetry run python counter/counter.py" --show-output --export-json "${{ env.OUTPUT_FILE }}" --shell bash
- name: Upload Benchmarks - name: Upload Benchmarks
if : ${{ env.DATABASE_URL && github.event.pull_request.merged == true }} if : ${{ env.DATABASE_URL }}
run: run:
poetry run python scripts/benchmarks/benchmark_imports.py --os "${{ matrix.os }}" poetry run python scripts/benchmarks/benchmark_imports.py --os "${{ matrix.os }}"
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
@ -166,7 +164,7 @@ jobs:
npm -v npm -v
poetry run bash scripts/integration.sh ./reflex-web prod poetry run bash scripts/integration.sh ./reflex-web prod
- name: Measure and upload .web size - name: Measure and upload .web size
if: ${{ env.DATABASE_URL && github.event.pull_request.merged == true }} if: ${{ env.DATABASE_URL}}
run: run:
poetry run python scripts/benchmarks/benchmark_reflex_size.py --os "${{ matrix.os }}" poetry run python scripts/benchmarks/benchmark_reflex_size.py --os "${{ matrix.os }}"
--python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"