Skip to content

Commit 4caa4e2

Browse files
committed
build: Cleaning CircleCI config
1 parent 8fefd59 commit 4caa4e2

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

.circleci/config.yml

+5-14
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
command: |
2727
python3 -m venv venv
2828
. venv/bin/activate
29-
pip install -e ".[mongodb]"
29+
pip3 install -e ".[mongodb]"
3030
3131
- save_cache:
3232
paths:
@@ -38,8 +38,8 @@ jobs:
3838
name: run tests
3939
command: |
4040
. venv/bin/activate
41-
python setup.py test
42-
41+
python3 setup.py test
42+
4343
publish-release:
4444
docker:
4545
- image: circleci/python:3.7
@@ -50,23 +50,14 @@ jobs:
5050
- run:
5151
name: check git tag with package version
5252
command: |
53-
check_git_tag_with_package_version () {
54-
tag_version=${CIRCLE_TAG#*v}
55-
pkg_version=$(python3 -c "import powerapi; print(powerapi.__version__)" 2>/dev/null || echo "error")
56-
if [ "$tag_version" = "$pkg_version" ]; then
57-
return 0
58-
fi
59-
return 1
60-
}
61-
check_git_tag_with_package_version
53+
python3 -c "import os, powerapi; exit(os.environ.get('CIRCLE_TAG', '?')[1:] != powerapi.__version__)"
6254
6355
- run:
6456
name: prepare environment
6557
command: |
6658
python3 -m venv venv
6759
. venv/bin/activate
68-
pip install --upgrade pip
69-
pip install --upgrade twine
60+
pip3 install -U pip twine
7061
7162
- run:
7263
name: init .pypirc

0 commit comments

Comments
 (0)