|
@@ -5,10 +5,6 @@ on:
|
|
branches: [main]
|
|
branches: [main]
|
|
paths-ignore:
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '**/*.md'
|
|
- pull_request:
|
|
|
|
- branches: [main]
|
|
|
|
- paths-ignore:
|
|
|
|
- - '**/*.md'
|
|
|
|
|
|
|
|
permissions:
|
|
permissions:
|
|
contents: read
|
|
contents: read
|
|
@@ -24,7 +20,6 @@ env:
|
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
|
|
|
|
-
|
|
|
|
jobs:
|
|
jobs:
|
|
reflex-web:
|
|
reflex-web:
|
|
strategy:
|
|
strategy:
|
|
@@ -93,6 +88,15 @@ jobs:
|
|
python-version: '3.9.18'
|
|
python-version: '3.9.18'
|
|
- os: windows-latest
|
|
- os: windows-latest
|
|
python-version: '3.8.18'
|
|
python-version: '3.8.18'
|
|
|
|
+ # keep only one python version for MacOS
|
|
|
|
+ - os: macos-latest
|
|
|
|
+ python-version: '3.8.18'
|
|
|
|
+ - os: macos-latest
|
|
|
|
+ python-version: '3.9.18'
|
|
|
|
+ - os: macos-latest
|
|
|
|
+ python-version: '3.10.13'
|
|
|
|
+ - os: macos-latest
|
|
|
|
+ python-version: '3.12.0'
|
|
include:
|
|
include:
|
|
- os: windows-latest
|
|
- os: windows-latest
|
|
python-version: '3.10.11'
|
|
python-version: '3.10.11'
|
|
@@ -143,13 +147,14 @@ jobs:
|
|
- name: Install additional dependencies for DB access
|
|
- name: Install additional dependencies for DB access
|
|
run: poetry run pip install psycopg2-binary
|
|
run: poetry run pip install psycopg2-binary
|
|
- name: Build reflex
|
|
- name: Build reflex
|
|
- run: |
|
|
|
|
|
|
+ run: |
|
|
poetry build
|
|
poetry build
|
|
- name: Upload benchmark results
|
|
- name: Upload benchmark results
|
|
# Only run if the database creds are available in this context.
|
|
# Only run if the database creds are available in this context.
|
|
if: ${{ env.DATABASE_URL }}
|
|
if: ${{ env.DATABASE_URL }}
|
|
- run: poetry run python scripts/benchmarks/benchmark_reflex_size.py --os ubuntu-latest
|
|
|
|
- --python-version 3.11.5 --commit-sha "${{ github.sha }}" --pr-id "${{ github.event.pull_request.id }}"
|
|
|
|
|
|
+ run:
|
|
|
|
+ poetry run python scripts/benchmarks/benchmark_reflex_size.py --os ubuntu-latest
|
|
|
|
+ --python-version 3.11.5 --commit-sha "${{ github.sha }}" --pr-id "${{ github.event.pull_request.id }}"
|
|
--db-url "${{ env.DATABASE_URL }}" --branch-name "${{ github.head_ref || github.ref_name }}"
|
|
--db-url "${{ env.DATABASE_URL }}" --branch-name "${{ github.head_ref || github.ref_name }}"
|
|
--measurement-type "reflex-build" --path ./dist
|
|
--measurement-type "reflex-build" --path ./dist
|
|
|
|
|
|
@@ -160,8 +165,8 @@ jobs:
|
|
fail-fast: false
|
|
fail-fast: false
|
|
matrix:
|
|
matrix:
|
|
# Show OS combos first in GUI
|
|
# Show OS combos first in GUI
|
|
- os: [ ubuntu-latest, windows-latest, macos-latest ]
|
|
|
|
- python-version: [ '3.11.5']
|
|
|
|
|
|
+ os: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
+ python-version: ['3.11.5']
|
|
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
steps:
|
|
@@ -170,7 +175,7 @@ jobs:
|
|
- name: Install Poetry
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
with:
|
|
- version : 1.3.1
|
|
|
|
|
|
+ version: 1.3.1
|
|
virtualenvs-create: true
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
virtualenvs-in-project: true
|
|
virtualenvs-path: .venv
|
|
virtualenvs-path: .venv
|
|
@@ -180,15 +185,16 @@ jobs:
|
|
run: |
|
|
run: |
|
|
python -m venv .venv
|
|
python -m venv .venv
|
|
source .venv/*/activate
|
|
source .venv/*/activate
|
|
- poetry install --without dev --no-interaction --no-root
|
|
|
|
|
|
+ poetry install --without dev --no-interaction --no-root
|
|
|
|
|
|
- name: Install additional dependencies for DB access
|
|
- name: Install additional dependencies for DB access
|
|
run: poetry run pip install psycopg2-binary
|
|
run: poetry run pip install psycopg2-binary
|
|
|
|
|
|
- if: ${{ env.DATABASE_URL }}
|
|
- if: ${{ env.DATABASE_URL }}
|
|
name: calculate and upload size
|
|
name: calculate and upload size
|
|
- run: poetry run python scripts/benchmarks/benchmark_reflex_size.py --os "${{ matrix.os }}"
|
|
|
|
|
|
+ run:
|
|
|
|
+ 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 }}"
|
|
--pr-id "${{ github.event.pull_request.id }}" --db-url "${{ env.DATABASE_URL }}"
|
|
--pr-id "${{ github.event.pull_request.id }}" --db-url "${{ env.DATABASE_URL }}"
|
|
--branch-name "${{ github.head_ref || github.ref_name }}"
|
|
--branch-name "${{ github.head_ref || github.ref_name }}"
|
|
- --measurement-type "reflex-package" --path ./.venv
|
|
|
|
|
|
+ --measurement-type "reflex-package" --path ./.venv
|