...
 
Commits (4)
......@@ -106,4 +106,5 @@ venv.bak/
# Code editors
.idea
.vscode
\ No newline at end of file
.vscode
/.gtm/
image: python:3.7-alpine
cache:
key: $CI_COMMIT_REF
key: $CI_COMMIT_REF_NAME
paths:
- .cache
- .cache
policy: pull
variables:
PIP_DOWNLOAD_CACHE: .cache
stages:
- build
- dist
- cache
- build
- test
- dist
virtualenv:
stage: cache
allow_failure: true
before_script:
- |
if [ ! -f "venv/last_commit_sha" ]; then
LAST_COMMIT=$(git log --oneline --reverse | head -n 1 | awk '{print $1};');
else
LAST_COMMIT=$(cat "venv/last_commit_sha");
fi
CURR_COMMIT=$(git rev-parse HEAD)
git diff --name-only ${LAST_COMMIT} ${CURR_COMMIT} | grep "Pipfile"
script:
- pip install pipenv
- |
if [ ! -d "venv" ]; then
virtualenv venv
fi
- . venv/bin/activate
- pipenv install --dev
cache:
policy: pull-push
build:py2:
stage: build
image: python:2.7.15-alpine
before_script:
- pip install wheel
- python -V
- pip install wheel
- python -V
script:
- pip wheel .
- mkdir -p dist
- mv async_call*.whl dist
- pip wheel .
- mkdir -p dist
- mv async_call*.whl dist
artifacts:
paths:
- dist
- dist
name: Python 2
build:py3:
stage: build
before_script:
- pip install wheel
- pip install wheel
script:
- pip wheel .
- mkdir -p dist
- mv async_call*.whl dist
- pip wheel .
- mkdir -p dist
- mv async_call*.whl dist
artifacts:
paths:
- dist
- dist
name: Python 3
test:py2:
stage: build
image: python:2.7-alpine
before_script:
- pip install nose typing
- python -V
script:
- nosetests -v tests
test:py3:
stage: build
test:
image: python:3.7
stage: test
variables:
VERSIONS: 2.7.15 3.5.5 3.6.6 3.7.0
before_script:
- pip install nose coverage
# Install pyenv
- apt-get update -qq
- apt-get install -y -qq make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget
curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
- git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- export PYENV_ROOT="$HOME/.pyenv"
- export PATH="$PYENV_ROOT/bin:$PATH"
- eval "$(pyenv init -)"
- . venv/bin/activate
script:
- nosetests -v --with-coverage --cover-package=call tests
- setopt shwordsplit; for v in $VERSIONS; do pyenv install $v -s; done; unsetopt shwordsplit;
- pyenv local 2.7.15 3.5.5 3.6.6 3.7.0
- tox
artifacts:
paths:
- .coverage
- .coverage
expire_in: 1 hour
dist-test:
stage: dist
dependencies:
- build:py2
- build:py3
- build:py2
- build:py3
variables:
GIT_STRATEGY: none
before_script:
- pip install twine
- pip install twine
script:
- >
twine upload dist/*.whl
--repository-url https://test.pypi.org/legacy/
-u $PIP_UPLOAD_USER
-p $PIP_UPLOAD_TEST_PASSWD
- >
twine upload dist/*.whl
--repository-url https://test.pypi.org/legacy/
-u $PIP_UPLOAD_USER
-p $PIP_UPLOAD_TEST_PASSWD
only:
- develop
when: manual
......@@ -82,29 +112,29 @@ dist-test:
dist:
stage: dist
dependencies:
- build:py2
- build:py3
- build:py2
- build:py3
variables:
GIT_STRATEGY: none
before_script:
- pip install twine
- pip install twine
script:
- twine upload dist/*.whl -u $PIP_UPLOAD_USER -p $PIP_UPLOAD_PASSWD
- twine upload dist/*.whl -u $PIP_UPLOAD_USER -p $PIP_UPLOAD_PASSWD
only:
- tags
pages:
stage: dist
dependencies:
- test:py3
- test:py3
before_script:
- pip install coverage
- pip install coverage
script:
- coverage html
- coverage html
after_script:
- mv htmlcov public
- mv htmlcov public
artifacts:
paths:
- public
- public
expire_in: 1 hour
only:
- develop
......@@ -112,10 +142,10 @@ pages:
codacy:
stage: dist
dependencies:
- test:py3
- test:py3
before_script:
- apk add git
- pip install codacy-coverage coverage
- apk add git
- pip install codacy-coverage coverage
script:
- coverage xml
- python-codacy-coverage -r coverage.xml
\ No newline at end of file
- coverage xml
- python-codacy-coverage -r coverage.xml
\ No newline at end of file
......@@ -7,6 +7,11 @@ name = "pypi"
[dev-packages]
nose = "*"
tox = "*"
mypy = "*"
"flake8" = "*"
twine = "*"
tox-pyenv = "*"
[requires]
python_version = "3.6"
{
"_meta": {
"hash": {
"sha256": "0b3dbf9bb3856f8e27371fe3d067e7848bea03d79c1f5f29dc10401629c19b5e"
"sha256": "38ef306a11e3590cb976c3d35f6088941d228daa38e0fd64b61f152fd02cd5d5"
},
"pipfile-spec": 6,
"requires": {
......@@ -17,6 +17,50 @@
},
"default": {},
"develop": {
"certifi": {
"hashes": [
"sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7",
"sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"
],
"version": "==2018.4.16"
},
"chardet": {
"hashes": [
"sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
"sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
],
"version": "==3.0.4"
},
"flake8": {
"hashes": [
"sha256:7253265f7abd8b313e3892944044a365e3f4ac3fcdcfb4298f55ee9ddf188ba0",
"sha256:c7841163e2b576d435799169b78703ad6ac1bbb0f199994fc05f700b2a90ea37"
],
"index": "pypi",
"version": "==3.5.0"
},
"idna": {
"hashes": [
"sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
"sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
],
"version": "==2.7"
},
"mccabe": {
"hashes": [
"sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
"sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
],
"version": "==0.6.1"
},
"mypy": {
"hashes": [
"sha256:673ea75fb750289b7d1da1331c125dc62fc1c3a8db9129bb372ae7b7d5bf300a",
"sha256:c770605a579fdd4a014e9f0a34b6c7a36ce69b08100ff728e96e27445cef3b3c"
],
"index": "pypi",
"version": "==0.620"
},
"nose": {
"hashes": [
"sha256:9ff7c6cc443f8c51994b34a667bbcf45afd6d945be7477b52e97516fd17c53ac",
......@@ -25,6 +69,154 @@
],
"index": "pypi",
"version": "==1.3.7"
},
"packaging": {
"hashes": [
"sha256:e9215d2d2535d3ae866c3d6efc77d5b24a0192cce0ff20e42896cc0664f889c0",
"sha256:f019b770dd64e585a99714f1fd5e01c7a8f11b45635aa953fd41c689a657375b"
],
"version": "==17.1"
},
"pkginfo": {
"hashes": [
"sha256:5878d542a4b3f237e359926384f1dde4e099c9f5525d236b1840cf704fa8d474",
"sha256:a39076cb3eb34c333a0dd390b568e9e1e881c7bf2cc0aee12120636816f55aee"
],
"version": "==1.4.2"
},
"pluggy": {
"hashes": [
"sha256:6e3836e39f4d36ae72840833db137f7b7d35105079aee6ec4a62d9f80d594dd1",
"sha256:95eb8364a4708392bae89035f45341871286a333f749c3141c20573d2b3876e1"
],
"markers": "python_version != '3.1.*' and python_version != '3.0.*' and python_version != '3.2.*' and python_version >= '2.7' and python_version != '3.3.*'",
"version": "==0.7.1"
},
"py": {
"hashes": [
"sha256:3fd59af7435864e1a243790d322d763925431213b6b8529c6ca71081ace3bbf7",
"sha256:e31fb2767eb657cbde86c454f02e99cb846d3cd9d61b318525140214fdc0e98e"
],
"markers": "python_version != '3.1.*' and python_version != '3.0.*' and python_version != '3.2.*' and python_version >= '2.7' and python_version != '3.3.*'",
"version": "==1.5.4"
},
"pycodestyle": {
"hashes": [
"sha256:682256a5b318149ca0d2a9185d365d8864a768a28db66a84a2ea946bcc426766",
"sha256:6c4245ade1edfad79c3446fadfc96b0de2759662dc29d07d80a6f27ad1ca6ba9"
],
"version": "==2.3.1"
},
"pyflakes": {
"hashes": [
"sha256:08bd6a50edf8cffa9fa09a463063c425ecaaf10d1eb0335a7e8b1401aef89e6f",
"sha256:8d616a382f243dbf19b54743f280b80198be0bca3a5396f1d2e1fca6223e8805"
],
"version": "==1.6.0"
},
"pyparsing": {
"hashes": [
"sha256:0832bcf47acd283788593e7a0f542407bd9550a55a8a8435214a1960e04bcb04",
"sha256:fee43f17a9c4087e7ed1605bd6df994c6173c1e977d7ade7b651292fab2bd010"
],
"version": "==2.2.0"
},
"requests": {
"hashes": [
"sha256:63b52e3c866428a224f97cab011de738c36aec0185aa91cfacd418b5d58911d1",
"sha256:ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a"
],
"version": "==2.19.1"
},
"requests-toolbelt": {
"hashes": [
"sha256:42c9c170abc2cacb78b8ab23ac957945c7716249206f90874651971a4acff237",
"sha256:f6a531936c6fa4c6cfce1b9c10d5c4f498d16528d2a54a22ca00011205a187b5"
],
"version": "==0.8.0"
},
"six": {
"hashes": [
"sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
"sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
],
"version": "==1.11.0"
},
"tox": {
"hashes": [
"sha256:0a0f1e8e15569e6507597517aa9e890434e8cc604bf229748c877751b4498054",
"sha256:0b3efa8fb125c65e531619920ec904862f8b6c04a15f929ada3949e12973dbc8"
],
"index": "pypi",
"version": "==3.1.3"
},
"tox-pyenv": {
"hashes": [
"sha256:916c2213577aec0b3b5452c5bfb32fd077f3a3196f50a81ad57d7ef3fc2599e4",
"sha256:e470c18af115fe52eeff95e7e3cdd0793613eca19709966fc2724b79d55246cb"
],
"index": "pypi",
"version": "==1.1.0"
},
"tqdm": {
"hashes": [
"sha256:536e5a0205b6401d8aaf04b21469949c178dbe3642e3c76d3bb494a83cb22a10",
"sha256:60bbaa6700e87a250f6abcbbd7ddb33243ad592240ba46afce5305b15b406fad"
],
"markers": "python_version >= '2.6' and python_version != '3.1.*' and python_version != '3.0.*'",
"version": "==4.24.0"
},
"twine": {
"hashes": [
"sha256:08eb132bbaec40c6d25b358f546ec1dc96ebd2638a86eea68769d9e67fe2b129",
"sha256:2fd9a4d9ff0bcacf41fdc40c8cb0cfaef1f1859457c9653fd1b92237cc4e9f25"
],
"index": "pypi",
"version": "==1.11.0"
},
"typed-ast": {
"hashes": [
"sha256:0948004fa228ae071054f5208840a1e88747a357ec1101c17217bfe99b299d58",
"sha256:10703d3cec8dcd9eef5a630a04056bbc898abc19bac5691612acba7d1325b66d",
"sha256:1f6c4bd0bdc0f14246fd41262df7dfc018d65bb05f6e16390b7ea26ca454a291",
"sha256:25d8feefe27eb0303b73545416b13d108c6067b846b543738a25ff304824ed9a",
"sha256:29464a177d56e4e055b5f7b629935af7f49c196be47528cc94e0a7bf83fbc2b9",
"sha256:2e214b72168ea0275efd6c884b114ab42e316de3ffa125b267e732ed2abda892",
"sha256:3e0d5e48e3a23e9a4d1a9f698e32a542a4a288c871d33ed8df1b092a40f3a0f9",
"sha256:519425deca5c2b2bdac49f77b2c5625781abbaf9a809d727d3a5596b30bb4ded",
"sha256:57fe287f0cdd9ceaf69e7b71a2e94a24b5d268b35df251a88fef5cc241bf73aa",
"sha256:668d0cec391d9aed1c6a388b0d5b97cd22e6073eaa5fbaa6d2946603b4871efe",
"sha256:68ba70684990f59497680ff90d18e756a47bf4863c604098f10de9716b2c0bdd",
"sha256:6de012d2b166fe7a4cdf505eee3aaa12192f7ba365beeefaca4ec10e31241a85",
"sha256:79b91ebe5a28d349b6d0d323023350133e927b4de5b651a8aa2db69c761420c6",
"sha256:8550177fa5d4c1f09b5e5f524411c44633c80ec69b24e0e98906dd761941ca46",
"sha256:898f818399cafcdb93cbbe15fc83a33d05f18e29fb498ddc09b0214cdfc7cd51",
"sha256:94b091dc0f19291adcb279a108f5d38de2430411068b219f41b343c03b28fb1f",
"sha256:a26863198902cda15ab4503991e8cf1ca874219e0118cbf07c126bce7c4db129",
"sha256:a8034021801bc0440f2e027c354b4eafd95891b573e12ff0418dec385c76785c",
"sha256:bc978ac17468fe868ee589c795d06777f75496b1ed576d308002c8a5756fb9ea",
"sha256:c05b41bc1deade9f90ddc5d988fe506208019ebba9f2578c622516fd201f5863",
"sha256:c9b060bd1e5a26ab6e8267fd46fc9e02b54eb15fffb16d112d4c7b1c12987559",
"sha256:edb04bdd45bfd76c8292c4d9654568efaedf76fe78eb246dde69bdb13b2dad87",
"sha256:f19f2a4f547505fe9072e15f6f4ae714af51b5a681a97f187971f50c283193b6"
],
"version": "==1.1.0"
},
"urllib3": {
"hashes": [
"sha256:a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf",
"sha256:b5725a0bd4ba422ab0e66e89e030c806576753ea3ee08554382c14e685d117b5"
],
"markers": "python_version != '3.1.*' and python_version != '3.2.*' and python_version != '3.3.*' and python_version >= '2.6' and python_version < '4' and python_version != '3.0.*'",
"version": "==1.23"
},
"virtualenv": {
"hashes": [
"sha256:2ce32cd126117ce2c539f0134eb89de91a8413a29baac49cbab3eb50e2026669",
"sha256:ca07b4c0b54e14a91af9f34d0919790b016923d157afda5efdde55c96718f752"
],
"markers": "python_version != '3.1.*' and python_version != '3.0.*' and python_version != '3.2.*' and python_version >= '2.7'",
"version": "==16.0.0"
}
}
}
[tox]
envlist = py{27,35,36,37}
[testenv]
deps = nose
commands = nosetests tests --with-coverage