|
21 | 21 | PYTHONIOENCODING: 'utf8' |
22 | 22 | TELEMETRY_ENABLED: false |
23 | 23 | NODE_OPTIONS: '--max_old_space_size=4096' |
| 24 | + DATABASE_URL: ${{ secrets.DATABASE_URL }} |
24 | 25 |
|
25 | 26 | jobs: |
26 | 27 | reflex-web: |
27 | | - env: |
28 | | - DATABASE_URL: ${{ secrets.DATABASE_URL }} |
29 | 28 | strategy: |
30 | 29 | fail-fast: false |
31 | 30 | matrix: |
|
70 | 69 | - name: Run Benchmarks |
71 | 70 | # Only run if the database creds are available in this context. |
72 | 71 | if: ${{ env.DATABASE_URL }} |
73 | | - working-directory: ./integration/benchmarks |
74 | | - run: poetry run python benchmarks.py "$GITHUB_SHA" .lighthouseci |
| 72 | + run: poetry run python scripts/lighthouse_score_upload.py "$GITHUB_SHA" ./integration/benchmarks/.lighthouseci |
75 | 73 | env: |
76 | 74 | GITHUB_SHA: ${{ github.sha }} |
77 | 75 | PR_TITLE: ${{ github.event.pull_request.title }} |
| 76 | + |
| 77 | + simple-apps-benchmarks: |
| 78 | + env: |
| 79 | + OUTPUT_FILE: benchmarks.json |
| 80 | + timeout-minutes: 50 |
| 81 | + strategy: |
| 82 | + # Prioritize getting more information out of the workflow (even if something fails) |
| 83 | + fail-fast: false |
| 84 | + matrix: |
| 85 | + # Show OS combos first in GUI |
| 86 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 87 | + python-version: ['3.8.18', '3.9.18', '3.10.13', '3.11.5', '3.12.0'] |
| 88 | + exclude: |
| 89 | + - os: windows-latest |
| 90 | + python-version: '3.10.13' |
| 91 | + - os: windows-latest |
| 92 | + python-version: '3.9.18' |
| 93 | + - os: windows-latest |
| 94 | + python-version: '3.8.18' |
| 95 | + include: |
| 96 | + - os: windows-latest |
| 97 | + python-version: '3.10.11' |
| 98 | + - os: windows-latest |
| 99 | + python-version: '3.9.13' |
| 100 | + - os: windows-latest |
| 101 | + python-version: '3.8.10' |
| 102 | + |
| 103 | + runs-on: ${{ matrix.os }} |
| 104 | + steps: |
| 105 | + - uses: actions/checkout@v4 |
| 106 | + - uses: ./.github/actions/setup_build_env |
| 107 | + with: |
| 108 | + python-version: ${{ matrix.python-version }} |
| 109 | + run-poetry-install: true |
| 110 | + create-venv-at-path: .venv |
| 111 | + - name: Install additional dependencies for DB access |
| 112 | + run: poetry run pip install psycopg2-binary |
| 113 | + - name: Run benchmark tests |
| 114 | + env: |
| 115 | + APP_HARNESS_HEADLESS: 1 |
| 116 | + PYTHONUNBUFFERED: 1 |
| 117 | + run: | |
| 118 | + poetry run pytest -v benchmarks/ --benchmark-json=${{ env.OUTPUT_FILE }} -s |
| 119 | + - name: Upload benchmark results |
| 120 | + # Only run if the database creds are available in this context. |
| 121 | + if: ${{ env.DATABASE_URL }} |
| 122 | + run: poetry run python scripts/simple_app_benchmark_upload.py --os "${{ matrix.os }}" |
| 123 | + --python-version "${{ matrix.python-version }}" --commit-sha "${{ github.sha }}" |
| 124 | + --benchmark-json "${{ env.OUTPUT_FILE }}" --pr-title "${{ github.event.pull_request.title }}" |
| 125 | + --db-url "${{ env.DATABASE_URL }}" --branch-name "${{ github.head_ref || github.ref_name }}" |
| 126 | + --event-type "${{ github.event_name }}" --actor "${{ github.actor }}" |
0 commit comments