Skip to content

Commit

Permalink
use codspeed.yml instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ElijahAhianyo committed Mar 5, 2024
1 parent 0854292 commit 6e61bb1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 40 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,43 +67,3 @@ jobs:
poetry run bash scripts/benchmarks.sh ./reflex-web prod
env:
LHCI_GITHUB_APP_TOKEN: $


reflex-benchmarks:
timeout-minutes: 30
strategy:
# Prioritize getting more information out of the workflow (even if something fails)
fail-fast: false
matrix:
# Show OS combos first in GUI
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ '3.8.18', '3.9.18', '3.10.13', '3.11.5', '3.12.0' ]
exclude:
- os: windows-latest
python-version: '3.10.13'
- os: windows-latest
python-version: '3.9.18'
- os: windows-latest
python-version: '3.8.18'
include:
- os: windows-latest
python-version: '3.10.11'
- os: windows-latest
python-version: '3.9.13'
- os: windows-latest
python-version: '3.8.10'

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_build_env
with:
python-version: ${{ matrix.python-version }}
run-poetry-install: true
create-venv-at-path: .venv
- run: poetry run pip install pytest-codspeed pyvirtualdisplay pillow
- name: Run Benchmarks
# Only run if the database creds are available in this context.
uses: CodSpeedHQ/action@v2
with:
run: poetry run pytest integration/benchmarks/ --codspeed
43 changes: 43 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: codspeed-benchmarks

on:
push:
branches: [main]
paths-ignore:
- '**/*.md'
pull_request:
branches: [main]
paths-ignore:
- '**/*.md'

permissions:
contents: read

defaults:
run:
shell: bash

jobs:
benchmarks:
strategy:
# Prioritize getting more information out of the workflow (even if something fails)
fail-fast: false
matrix:
# Show OS combos first in GUI
os: [ ubuntu-latest ]
python-version: [ '3.8.18', '3.9.18', '3.10.13', '3.11.5', '3.12.0' ]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
run-poetry-install: true
create-venv-at-path: .venv

- run: poetry run pip install pytest-codspeed pyvirtualdisplay pillow
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
run: poetry run pytest tests/ --codspeed

0 comments on commit 6e61bb1

Please sign in to comment.