Skip to content

Commit c85dc71

Browse files
committed
CI: Fix package tests
1 parent 42a273a commit c85dc71

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

.circleci/config.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -374,33 +374,36 @@ jobs:
374374
fi
375375
376376
test_package:
377-
machine:
378-
image: circleci/classic:201711-01
377+
docker:
378+
- image: circleci/python:3.7.4
379379
working_directory: /tmp/src/sdcflows
380380
steps:
381381
- checkout
382382
- run:
383383
name: Setup Python environment with virtualenvs
384384
command: |
385-
pyenv global 3.5.2
386-
python3 -m pip install --upgrade virtualenv
385+
python -m pip install --upgrade virtualenv pip
387386
- run:
388387
name: Prepare build environment
389388
command: |
390389
virtualenv --python=python3 /tmp/build
391390
source /tmp/build/bin/activate
392391
python3 -m pip install "setuptools>=30.3.0" "pip>=10.0.1" twine docutils
393392
- run:
394-
name: Prepare install environment
393+
name: Prepare install environments
395394
command: |
396-
virtualenv --python=python3 /tmp/install
397-
source /tmp/install/bin/activate
395+
virtualenv --python=python3 /tmp/install_sdist
396+
source /tmp/install_sdist/bin/activate
397+
python3 -m pip install "setuptools>=30.3.0" "pip>=10.0.1"
398+
deactivate
399+
virtualenv --python=python3 /tmp/install_wheel
400+
source /tmp/install_wheel/bin/activate
398401
python3 -m pip install "setuptools>=30.3.0" "pip>=10.0.1"
399402
- run:
400403
name: Build SDCflows in build environment
401404
command: |
402405
source /tmp/build/bin/activate
403-
python setup.py sdist
406+
python setup.py sdist bdist_wheel
404407
- store_artifacts:
405408
path: /tmp/src/sdcflows/dist
406409
- run:
@@ -411,11 +414,25 @@ jobs:
411414
- run:
412415
name: Install sdist package into install environment and check version
413416
command: |
414-
source /tmp/install/bin/activate
417+
source /tmp/install_sdist/bin/activate
415418
THISVERSION=$( python get_version.py )
416419
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
417420
pip install dist/sdcflows*.tar.gz
418-
which sdcflows | grep install\\/bin
421+
which sdcflows | grep install_sdist\\/bin
422+
INSTALLED_VERSION=$(sdcflows --version)
423+
INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'}
424+
INSTALLED_VERSION=${INSTALLED_VERSION#*"sdcflows v"}
425+
echo "VERSION: \"$THISVERSION\""
426+
echo "INSTALLED: \"$INSTALLED_VERSION\""
427+
test "$INSTALLED_VERSION" = "v$THISVERSION"
428+
- run:
429+
name: Install wheel into install environment and check version
430+
command: |
431+
source /tmp/install_wheel/bin/activate
432+
THISVERSION=$( python get_version.py )
433+
THISVERSION=${CIRCLE_TAG:-$THISVERSION}
434+
pip install dist/sdcflows*.whl
435+
which sdcflows | grep install_wheel\\/bin
419436
INSTALLED_VERSION=$(sdcflows --version)
420437
INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'}
421438
INSTALLED_VERSION=${INSTALLED_VERSION#*"sdcflows v"}

0 commit comments

Comments
 (0)