Skip to content

Commit

Permalink
ci: compare benchmark on every pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosschroh committed Jan 7, 2025
1 parent c2901df commit 674a0ee
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/bench-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
bench_release:
# if: ${{ startsWith(github.event.head_commit.message, 'bump:') }}
if: ${{ startsWith(github.event.head_commit.message, 'bump:') }}
runs-on: ubuntu-latest
steps:
- name: Check out
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/pr-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,37 @@ jobs:
name: django-streams
fail_ci_if_error: true
token: ${{secrets.CODECOV_TOKEN}}

bench:
# do not run on bench commits, which have automatically been generated by the bench_release job
if: ${{ !startsWith(github.event.head_commit.message, 'bench:') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.13'
architecture: x64
- name: Set Cache
uses: actions/cache@v4
id: cache # name for referring later
with:
path: .venv/
# The cache key depends on poetry.lock
key: ${{ runner.os }}-cache-${{ hashFiles('poetry.lock') }}-313
restore-keys: |
${{ runner.os }}-cache-
${{ runner.os }}-
- name: Install Dependencies
# if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install -U pip poetry
poetry --version
poetry config --local virtualenvs.in-project true
poetry install
- name: Benchmark regression test
run: |
./scripts/compare-benchmark

0 comments on commit 674a0ee

Please sign in to comment.