-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,27 @@ | ||
dist: xenial | ||
language: python | ||
addons: | ||
artifacts: true | ||
apt: | ||
update: true | ||
python: | ||
- '3.7' | ||
- "3.7" | ||
stages: | ||
- Tests | ||
- Black | ||
- Pylint | ||
- Deploy | ||
- Deploy | ||
before_install: | ||
- sudo apt-get install -y --no-install-recommends bc | ||
addons: | ||
apt: | ||
update: true | ||
install: &requirements | ||
- pip install -r requirements.txt | ||
- pip install -e . | ||
- sudo apt-get install -y --no-install-recommends bc | ||
install: | ||
- pip install -r requirements.txt | ||
- pip install -e . | ||
jobs: | ||
include: | ||
- stage: Tests | ||
install: *requirements | ||
script: | ||
- tox -e py37 | ||
after_success: | ||
- codecov | ||
- stage: Black | ||
install: *requirements | ||
script: | ||
- echo excluding $(git config --file .gitmodules --get-regexp path | awk '{ print | ||
$2 }') | ||
- black --exclude $(git config --file .gitmodules --get-regexp path | awk '{ print | ||
$2 }') --check . | ||
- stage: Pylint | ||
install: *requirements | ||
script: | ||
- pip --no-cache-dir install pylint-runner | ||
- pylint_runner --rcfile=.pylintrc --output-format=text . | tee pylint.txt | ||
- score=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' pylint.txt) | ||
- if (( $(echo "$score < 8" |bc -l) )); then echo "Your Pylint score is too low, $score < 8!"; exit 1; fi | ||
- stage: Deploy | ||
script: skip | ||
deploy: | ||
provider: pypi | ||
user: __token__ | ||
password: | ||
secure: iK0uLrbHZV17FkpcyG5f8FaC87iLlTz1AVpSu5QSoYQaU1L7Pm2YpwvJPAp0jElTNoFPuTZ07r30s6dJIzYPtqadGPbS6ETme6iThFcr/cWWRj+TAXAwFdXwwyt/B5q/iVP2l/T7v5XTyLfaDWBvoBCFv4u+WCthdDRCthKyARXW+ZHJXXOjtGLXrgC+WJUQ+UhcmZHLsOECJMfJveAkJwnvaS24SaaYw8hFtOj0Xhc+1T2FDGACOIkUO/9yxBsTX2BLCAJ3na8U7weSvM78R36whWlAFJmSDMhLfxYLPusH9WEZUEOz+zdoU6xHqLqLf8lEjgiV07b3Q9N9FbW/cOC0WuToAfa+ENijh4YwgotnFWbYtvWY2O0xXpeOQ54eerivdKrwxda9CLHz1E54UY27VWYD8ZioHufgvRsHP/XLEo6uBiG5Q81hteW/kpOgCCl/o/l60Rau1+kNXqy9uuJ5pHTTF50k0TzI41LU9ps9l3ko5driBTOFQ/CWi/7CxWus7fP9UKIyR1i38LS1LSX/RKHrcmu0vzs5gODifqRiHRaq3GaFWbhxGxWKi+xR7j4Ve89YSY0Wcy+LVc6m65ySiP0UhWO4OSCmBCwIMkOIJMnrqdU3eTHhHLpf7wy9wArX1sKvhItFslUUjH7xF8eEWCfYP/O6bKjpC8Ndv6U= | ||
on: | ||
tags: true | ||
all_branches: true | ||
# Deploy only if tag respects semantic versioning pre-pended with v (e.g. v0.1.0) | ||
if: tag =~ /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/ | ||
include: | ||
- stage: Deploy | ||
script: skip | ||
deploy: | ||
provider: pypi | ||
user: EmanueleGhelfi | ||
password: | ||
secure: iK0uLrbHZV17FkpcyG5f8FaC87iLlTz1AVpSu5QSoYQaU1L7Pm2YpwvJPAp0jElTNoFPuTZ07r30s6dJIzYPtqadGPbS6ETme6iThFcr/cWWRj+TAXAwFdXwwyt/B5q/iVP2l/T7v5XTyLfaDWBvoBCFv4u+WCthdDRCthKyARXW+ZHJXXOjtGLXrgC+WJUQ+UhcmZHLsOECJMfJveAkJwnvaS24SaaYw8hFtOj0Xhc+1T2FDGACOIkUO/9yxBsTX2BLCAJ3na8U7weSvM78R36whWlAFJmSDMhLfxYLPusH9WEZUEOz+zdoU6xHqLqLf8lEjgiV07b3Q9N9FbW/cOC0WuToAfa+ENijh4YwgotnFWbYtvWY2O0xXpeOQ54eerivdKrwxda9CLHz1E54UY27VWYD8ZioHufgvRsHP/XLEo6uBiG5Q81hteW/kpOgCCl/o/l60Rau1+kNXqy9uuJ5pHTTF50k0TzI41LU9ps9l3ko5driBTOFQ/CWi/7CxWus7fP9UKIyR1i38LS1LSX/RKHrcmu0vzs5gODifqRiHRaq3GaFWbhxGxWKi+xR7j4Ve89YSY0Wcy+LVc6m65ySiP0UhWO4OSCmBCwIMkOIJMnrqdU3eTHhHLpf7wy9wArX1sKvhItFslUUjH7xF8eEWCfYP/O6bKjpC8Ndv6U= | ||
on: | ||
tags: true | ||
all_branches: true | ||
if: tag =~ /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters