Skip to content

Commit 7ce9c4f

Browse files
committed
MAINT Update to CircleCI 2 (#408)
1 parent 0dbacc7 commit 7ce9c4f

File tree

4 files changed

+39
-57
lines changed

4 files changed

+39
-57
lines changed

.circleci/config.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
version: 2
2+
3+
jobs:
4+
python3:
5+
docker:
6+
- image: circleci/python:3.6.1
7+
environment:
8+
- USERNAME: "scikit-learn-contrib"
9+
- DOC_REPO: "imbalanced-learn"
10+
- DOC_URL: ""
11+
- EMAIL: "g.lemaitre58@gmail.com"
12+
- MINICONDA_PATH: ~/miniconda
13+
- CONDA_ENV_NAME: testenv
14+
- PYTHON_VERSION: 3
15+
steps:
16+
- checkout
17+
- run: ./build_tools/circle/checkout_merge_commit.sh
18+
- run: ./build_tools/circle/build_doc.sh
19+
- store_artifacts:
20+
path: doc/_build/html/stable
21+
destination: doc
22+
- store_artifacts:
23+
path: ~/log.txt
24+
- deploy:
25+
command: |
26+
if [[ "${CIRCLE_BRANCH}" =~ ^master$|^[0-9]+\.[0-9]+\.X$ ]]; then
27+
bash ./build_tools/circle/push_doc.sh
28+
fi
29+
filters:
30+
branches:
31+
ignore: gh-pages
32+
33+
workflows:
34+
version: 2
35+
build-doc-and-deploy:
36+
jobs:
37+
- python3

build_tools/circle/build_doc.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ conda install --yes pip numpy scipy scikit-learn pillow matplotlib sphinx \
9696
pip install -U git+https://github.com/sphinx-gallery/sphinx-gallery.git
9797

9898
# Build and install imbalanced-learn in dev mode
99-
cd "$HOME/$CIRCLE_PROJECT_REPONAME"
10099
ls -l
101-
python setup.py develop
100+
pip install -e .
102101

103102
# The pipefail is requested to propagate exit code
104103
set -o pipefail && cd doc && make $MAKE_TARGET 2>&1 | tee ~/log.txt

build_tools/circle/push_doc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ MSG="Pushing the docs to $dir/ for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1"
1616

1717
cd $HOME
1818
if [ ! -d $DOC_REPO ];
19-
then git clone --depth 1 --no-checkout "git@github.com:"$ORGANIZATION"/"$DOC_REPO".git";
19+
then git clone --depth 1 --no-checkout "git@github.com:"$USERNAME"/"$DOC_REPO".git";
2020
fi
2121
cd $DOC_REPO
2222
git config core.sparseCheckout true

circle.yml

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

0 commit comments

Comments
 (0)