-
-
Notifications
You must be signed in to change notification settings - Fork 26
40 lines (36 loc) · 1.03 KB
/
codspeed.yml
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
name: codspeed-benchmarks
on:
# Run on pushes to the main branch
push:
branches:
- "main"
# Run on pull requests
pull_request:
branches:
- "main"
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Cache poetry
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}-python-3.10
- run: poetry --version
- name: Install dependencies
run: poetry install --all-extras
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
run: "poetry run pytest tests/benchmarks/ --codspeed"