Skip to content

Commit 6cbb31b

Browse files
Adding benchmark run to the CI
1 parent 5a82f59 commit 6cbb31b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

asv_bench/benchmarks/algorithms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import warnings
22
from importlib import import_module
33

4-
import numpy as np
4+
# making the benchmarks fail, to see if this is detected by the CI:
5+
# import numpy as np
56
import pandas as pd
67
from pandas.util import testing as tm
78

azure-pipelines.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,22 @@ jobs:
144144
condition: true
145145
env:
146146
REPO_DIR: $(Build.ArtifactStagingDirectory)/pandas-docs-travis
147+
148+
- script: |
149+
export PATH=$HOME/miniconda3/bin:$PATH
150+
source activate pandas-dev
151+
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
152+
cd asv_bench
153+
ASV_ERRORS=$(asv dev > /dev/null)
154+
if [[ $ASV_ERRORS ]]; then
155+
echo "Benchmarks reported errors:"
156+
echo $ASV_ERRORS
157+
exit 1
158+
else
159+
echo "Benchmark run without errors"
160+
fi
161+
else
162+
echo "Benchmark not running, no changes detected"
163+
fi
164+
displayName: 'Running benchmarks'
165+
condition: true

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- pytz
1111

1212
# development
13+
- asv
1314
- Cython>=0.28.2
1415
- flake8
1516
- flake8-comprehensions

0 commit comments

Comments
 (0)