Skip to content

Commit c3752e9

Browse files
art049codspeedbot
authored andcommitted
feat: install codspeed
1 parent 88c3ec5 commit c3752e9

5 files changed

Lines changed: 42 additions & 115 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: ⚡️ Benchmarks
2+
3+
on:
4+
# Run on pushes to the main branch
5+
push:
6+
branches:
7+
- "master" # or "main"
8+
# Run on pull requests
9+
pull_request:
10+
# `workflow_dispatch` allows CodSpeed to trigger backtest
11+
# performance analysis in order to generate initial data.
12+
workflow_dispatch:
13+
14+
jobs:
15+
tests:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.11"
22+
23+
- name: update pip
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install --upgrade setuptools wheel
27+
28+
- name: get pip cache dir
29+
id: pip-cache
30+
run: echo "::set-output name=dir::$(pip cache dir)"
31+
32+
- name: cache pip dependencies
33+
uses: actions/cache@v3
34+
with:
35+
path: ${{ steps.pip-cache.outputs.dir }}
36+
key: pip|${{ runner.os }}|3.11|${{ hashFiles('setup.py') }}
37+
38+
- run: pip install -e ".[test]"
39+
- uses: CodSpeedHQ/action@v2
40+
with:
41+
run: pytest . --codspeed

.github/workflows/deploy.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def run_tests(self):
4747
tests_require = [
4848
"pytest>=7,<8",
4949
"pytest-benchmark>=4,<5",
50+
"pytest-codspeed",
5051
"pytest-cov>=4,<5",
5152
"pytest-mock>=3,<4",
5253
"pytest-asyncio>=0.16,<2",

0 commit comments

Comments
 (0)