Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from transferwise/support-binary-cols
Browse files Browse the repository at this point in the history
v1.1.0: support binary/varbinary columns
  • Loading branch information
Samira-El authored Dec 27, 2019
2 parents cbf0a21 + e3b3190 commit bf45009
Show file tree
Hide file tree
Showing 15 changed files with 878 additions and 314 deletions.
69 changes: 41 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,52 @@
version: 2

references:
container_config: &container_config
docker:
# Main Python container
- image: circleci/python:3.6.2
environment:
TAP_MYSQL_PORT: 3306
TAP_MYSQL_USER: root
TAP_MYSQL_PASSWORD: my-secret-passwd
TAP_MYSQL_HOST: test_mysql

# MariaDB service container image used as test source database
- image: mariadb:10.2.26
name: test_mysql
environment:
MYSQL_ROOT_PASSWORD: my-secret-passwd
MYSQL_DATABASE: tap_mysql_test
ports:
- 3306:3306
command: --default-authentication-plugin=mysql_native_password --log-bin=mysql-bin --binlog-format=ROW

jobs:
build:
docker:
- image: 218546966473.dkr.ecr.us-east-1.amazonaws.com/circle-ci:tap-tester
<<: *container_config

steps:
- checkout
- run:
name: 'Get environment variables'
name: 'Setup virtual environment'
command: |
aws s3 cp s3://com-stitchdata-dev-deployment-assets/environments/tap-tester/sandbox dev_env.sh
python3 -m venv ./virtualenvs/tap-mysql
. ./virtualenvs/tap-mysql/bin/activate
pip3 install --upgrade pip
pip3 install .[test]
- run:
name: 'Setup virtual env'
name: 'Pylinting'
command: |
virtualenv -p python3 ~/.virtualenvs/tap-mysql
source ~/.virtualenvs/tap-mysql/bin/activate
pip install .
pip install pylint
pylint tap_mysql -d C,W,unexpected-keyword-arg,duplicate-code
. ./virtualenvs/tap-mysql/bin/activate
pylint --rcfile .pylintrc tap_mysql/
- run:
name: 'Unit Tests'
name: 'Tests'
command: |
source ~/.virtualenvs/tap-mysql/bin/activate
pip install nose
source dev_env.sh
nosetests
- add_ssh_keys
- run:
name: 'Integration Tests'
command: |
source ~/.virtualenvs/tap-tester/bin/activate
source dev_env.sh
run-a-test --tap=tap-mysql \
--target=target-stitch \
--orchestrator=stitch-orchestrator \
[email protected] \
--password=$SANDBOX_PASSWORD \
--client-id=50 \
tap_tester.suites.mysql
. ./virtualenvs/tap-mysql/bin/activate
nosetests -c .noserc tests
workflows:
version: 2
build:
jobs:
- build
15 changes: 15 additions & 0 deletions .noserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[nosetests]
# enable coverage
with-coverage=1

# cover only the main package tap_mysql
cover-package=tap_mysql

# set coverage minimum to 85, it's the current value
cover-min-percentage=85

# product html coverage report
cover-html=1

# folder where to produce the html coverage report
cover-html-dir=coverage_report
Loading

0 comments on commit bf45009

Please sign in to comment.