1818 PYTHONIOENCODING : ' utf8'
1919 TELEMETRY_ENABLED : false
2020 NODE_OPTIONS : ' --max_old_space_size=4096'
21- DATABASE_URL : ${{ secrets.DATABASE_URL }}
2221 PR_TITLE : ${{ github.event.pull_request.title }}
2322
2423jobs :
@@ -62,17 +61,16 @@ jobs:
6261 run : |
6362 # Check that npm is home
6463 npm -v
65- poetry run bash scripts/ benchmarks/benchmarks .sh ./reflex-web prod
64+ poetry run bash benchmarks/lighthouse .sh ./reflex-web prod
6665 env :
6766 LHCI_GITHUB_APP_TOKEN : $
6867 - name : Run Benchmarks
6968 # Only run if the database creds are available in this context.
70- if : ${{ env.DATABASE_URL }}
71- run : poetry run python scripts/benchmarks/lighthouse_score_upload.py "$GITHUB_SHA" ./integration/benchmarks/.lighthouseci
69+ run : poetry run python benchmarks/benchmark_lighthouse.py "$GITHUB_SHA" ./integration/benchmarks/.lighthouseci
7270 env :
7371 GITHUB_SHA : ${{ github.sha }}
7472
75- simple-apps-benchmarks :
73+ simple-apps-benchmarks : # This app tests the compile times of various compoonents and pages
7674 if : github.event.pull_request.merged == true
7775 env :
7876 OUTPUT_FILE : benchmarks.json
@@ -116,8 +114,6 @@ jobs:
116114 python-version : ${{ matrix.python-version }}
117115 run-poetry-install : true
118116 create-venv-at-path : .venv
119- - name : Install additional dependencies for DB access
120- run : poetry run uv pip install psycopg2-binary
121117 - name : Run benchmark tests
122118 env :
123119 APP_HARNESS_HEADLESS : 1
@@ -126,16 +122,14 @@ jobs:
126122 poetry run pytest -v benchmarks/ --benchmark-json=${{ env.OUTPUT_FILE }} -s
127123 - name : Upload benchmark results
128124 # Only run if the database creds are available in this context.
129- if : ${{ env.DATABASE_URL }}
130125 run :
131- poetry run python scripts/ benchmarks/simple_app_benchmark_upload .py --os "${{ matrix.os }}"
126+ poetry run python benchmarks/benchmark_compile_times .py --os "${{ matrix.os }}"
132127 --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
133- --benchmark-json "${{ env.OUTPUT_FILE }}"
134- --db-url "${{ env.DATABASE_URL }}" --branch-name "${{ github.head_ref || github.ref_name }}"
135- --event-type "${{ github.event_name }}" --actor "${{ github.actor }}" --pr-id "${{ github.event.pull_request.id }}"
128+ --benchmark-json "${{ env.OUTPUT_FILE }}" --branch-name "${{ github.head_ref || github.ref_name }}"
129+ --event-type "${{ github.event_name }}" --pr-id "${{ github.event.pull_request.id }}"
136130
137- reflex-build -size :
138- if : github.event.pull_request.merged == true
131+ reflex-dist -size : # This job is used to calculate the size of the Reflex distribution (wheel file)
132+ if : github.event.pull_request.merged == true
139133 timeout-minutes : 30
140134 strategy :
141135 # Prioritize getting more information out of the workflow (even if something fails)
@@ -148,22 +142,19 @@ jobs:
148142 python-version : 3.11.5
149143 run-poetry-install : true
150144 create-venv-at-path : .venv
151- - name : Install additional dependencies for DB access
152- run : poetry run uv pip install psycopg2-binary
153145 - name : Build reflex
154146 run : |
155147 poetry build
156148 - name : Upload benchmark results
157149 # Only run if the database creds are available in this context.
158- if : ${{ env.DATABASE_URL }}
159150 run :
160- poetry run python scripts/ benchmarks/benchmark_reflex_size .py --os ubuntu-latest
151+ poetry run python benchmarks/benchmark_package_size .py --os ubuntu-latest
161152 --python-version 3.11.5 --commit-sha "${{ github.sha }}" --pr-id "${{ github.event.pull_request.id }}"
162- --db-url "${{ env.DATABASE_URL }}" -- branch-name "${{ github.head_ref || github.ref_name }}"
163- --measurement-type "reflex-build" -- path ./dist
153+ --branch-name "${{ github.head_ref || github.ref_name }}"
154+ --path ./dist
164155
165- reflex-plus-dependency- size :
166- if : github.event.pull_request.merged == true
156+ reflex-venv- size : # This job calculates the total size of Reflex and its dependencies
157+ if : github.event.pull_request.merged == true
167158 timeout-minutes : 30
168159 strategy :
169160 # Prioritize getting more information out of the workflow (even if something fails)
@@ -197,14 +188,10 @@ jobs:
197188 run : |
198189 poetry run pip install uv
199190
200- - name : Install additional dependencies for DB access
201- run : poetry run uv pip install psycopg2-binary
202-
203- - if : ${{ env.DATABASE_URL }}
204- name : calculate and upload size
191+ - name : calculate and upload size
205192 run :
206- poetry run python scripts/ benchmarks/benchmark_reflex_size .py --os "${{ matrix.os }}"
193+ poetry run python benchmarks/benchmark_package_size .py --os "${{ matrix.os }}"
207194 --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}"
208- --pr-id "${{ github.event.pull_request.id }}" --db-url "${{ env.DATABASE_URL }}"
195+ --pr-id "${{ github.event.pull_request.id }}"
209196 --branch-name "${{ github.head_ref || github.ref_name }}"
210- --measurement-type "reflex-package" -- path ./.venv
197+ --path ./.venv
0 commit comments