mirror of
https://github.com/hwchase17/langchain.git
synced 2026-01-13 20:06:24 +00:00
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: CodSpeed
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
paths:
|
|
- 'libs/core/**'
|
|
# `workflow_dispatch` allows CodSpeed to trigger backtest
|
|
# performance analysis in order to generate initial data.
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
codspeed:
|
|
name: Run benchmarks
|
|
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-benchmarks'))
|
|
runs-on: codspeed-macro
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
# We have to use 3.12, 3.13 is not yet supported
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
# Using this action is still necessary for CodSpeed to work
|
|
- uses: actions/setup-python@v3
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: install deps
|
|
run: uv sync --group test
|
|
working-directory: ./libs/core
|
|
|
|
- name: Run benchmarks
|
|
uses: CodSpeedHQ/action@v3
|
|
with:
|
|
token: ${{ secrets.CODSPEED_TOKEN }}
|
|
run: |
|
|
cd libs/core
|
|
uv run --no-sync pytest ./tests/benchmarks --codspeed
|