-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from Monogramm/develop
🔖 Release 1.1.0
- Loading branch information
Showing
74 changed files
with
2,838 additions
and
467 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
exclude_paths: | ||
- '**.sql' |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[report] | ||
omit = | ||
*/python?.?/* | ||
*/site-packages/nose/* |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
######################################## | ||
# ERPNext configuration | ||
######################################## | ||
|
||
ERPNEXT_HOME=/srv/erpnext/frappe | ||
|
||
ERPNEXT_SITE=localhost | ||
|
||
ERPNEXT_ADMIN_PWD=erpnext_admin_password | ||
|
||
# Generated with openssl rand -base64 32 | ||
ERPNEXT_ENCRYPTION_KEY=dcNdIKUHX/Vgl1sEc0eJIChyYx+2dQ/uASjWXs9hnic= | ||
|
||
ERPNEXT_DB_ROOT_LOGIN=root | ||
ERPNEXT_DB_ROOT_PWD=erpnext_db_root_password | ||
|
||
# DB name will be used as the DB user | ||
ERPNEXT_DB_NAME=erpnext | ||
ERPNEXT_DB_PWD=erpnext_password | ||
|
||
# Local development configuration | ||
IMAGE_NAME=docker-erpnext:erpnext_ocr-dev | ||
FRAPPE_APP_TO_TEST=erpnext_ocr |
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
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
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
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 |
---|---|---|
|
@@ -7,25 +7,35 @@ language: shell | |
|
||
branches: | ||
only: | ||
- develop | ||
- master | ||
- develop | ||
|
||
before_script: | ||
before_install: | ||
- env | sort | ||
- home=$(pwd) | ||
- dir=".travis" | ||
- export IMAGE_NAME=docker-erpnext-ext:erpnext_ocr-travis | ||
- export TAG=travis | ||
- export VCS_REF=`git rev-parse --short HEAD` | ||
- export BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` | ||
- export home=$(pwd) | ||
- export travis_dir="${home}/.travis" | ||
- export IMAGE_NAME="docker-erpnext_ocr:${TAG}" | ||
- export BUILD_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH}} | ||
- export BUILD_URL=https://github.com/${TRAVIS_PULL_REQUEST_SLUG:-${TRAVIS_REPO_SLUG}} | ||
|
||
script: | ||
- cd "$dir" | ||
install: | ||
- echo "Changing to travis test directory ($travis_dir)" | ||
- cd "$travis_dir" | ||
# Prepare base image for build version and variant | ||
- sed -i -e "s/%%VERSION%%/${VERSION}/g" Dockerfile.${VARIANT} | ||
- sed -i -e "s/%%IMAGE_NAME%%/${IMAGE_NAME}/g" Dockerfile_test | ||
- sed -i -e "s/%%IMAGE_NAME%%/${IMAGE_NAME}/g" Dockerfile.test | ||
# Test container build | ||
- travis_retry travis_wait 60 docker-compose -f docker-compose.${DATABASE}.yml build | ||
|
||
before_script: | ||
- docker images | ||
|
||
script: | ||
- echo "Changing to travis test directory ($travis_dir)" | ||
- cd "$travis_dir" | ||
# Test container run | ||
- travis_retry docker-compose -f docker-compose.${DATABASE}.yml up -d && sleep 60 | ||
- docker-compose -f docker-compose.${DATABASE}.yml ps | ||
|
@@ -43,7 +53,7 @@ script: | |
- docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_app" | grep "Up" | ||
- docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_web" | ||
- docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_web" | grep "Up" | ||
- echo 'Wait until test finished (3 minutes)' && sleep 180 | ||
- echo 'Wait until test finished (5 minutes)' && sleep 300 | ||
- docker-compose -f docker-compose.${DATABASE}.yml logs "sut" | ||
- docker-compose -f docker-compose.${DATABASE}.yml ps "sut" | grep "Exit 0" | ||
# Test container restart | ||
|
@@ -56,14 +66,32 @@ script: | |
- docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_app" | grep "Up" | ||
- docker-compose -f docker-compose.${DATABASE}.yml logs "erpnext_web" | ||
- docker-compose -f docker-compose.${DATABASE}.yml ps "erpnext_web" | grep "Up" | ||
- echo 'Wait until test finished (3 minutes)' && sleep 180 | ||
- echo 'Wait until test finished (5 minutes)' && sleep 300 | ||
- docker-compose -f docker-compose.${DATABASE}.yml logs "sut" | ||
- docker-compose -f docker-compose.${DATABASE}.yml ps "sut" | grep "Exit 0" | ||
|
||
#after_script: | ||
# - cd "$home" | ||
# - sudo pip install python-coveralls | ||
# - coveralls -b "$home" -d /srv/erpnext/frappe/sites/.coverage | ||
after_script: | ||
- echo "Changing to project directory ($home)" | ||
- cd "$home" | ||
- sudo pip install coverage==4.5.4 | ||
- sudo pip install python-coveralls | ||
- curl https://deepsource.io/cli | sudo sh | ||
# Create same directory path as docker test execution | ||
- sudo mkdir -p '/home/frappe/frappe-bench/apps' | ||
- sudo ln -sf "$home" '/home/frappe/frappe-bench/apps/erpnext_ocr' | ||
# Copy and convert coverage to XML format | ||
- cp '/srv/erpnext/frappe/sites/.coverage' .coverage | ||
- coverage xml | ||
- coverage report -m | ||
# Publish coverage to Coveralls | ||
- coveralls -b "$home" -d "$home/.coverage" | ||
# Publish coverage to Codacy | ||
- test -z "$CODACY_PROJECT_TOKEN" || bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l Python -r "./coverage.xml" | ||
# Publish coverage to Codecov | ||
- test -z "$CODECOV_TOKEN" || bash <(curl -s https://codecov.io/bash) | ||
# Publish coverage to DeepSource | ||
- export DEEPSOURCE_DSN=https://[email protected] | ||
- ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml | ||
|
||
notifications: | ||
email: false | ||
|
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
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
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
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
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
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
Oops, something went wrong.