1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
name: codspeed-benchmarks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
permissions:
contents: read
id-token: write
runs-on: codspeed-macro
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Install Poetry
uses: snok/install-poetry@v1.4
with:
version: 2.3.2
virtualenvs-create: false
- name: Poetry details
run: |
poetry --version
poetry config --list
- name: Install dependencies
run: poetry install --extras "all"
- name: Run benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: walltime
run: poetry run pytest benchmarks/ --codspeed
|