diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml new file mode 100644 index 0000000..630b635 --- /dev/null +++ b/.github/workflows/pythonpublish.yml @@ -0,0 +1,26 @@ +name: Upload Python Package to PyPi + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* diff --git a/setup.py b/setup.py index 88f1f88..0a2b52a 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup(name="pipelinewise-target-s3-csv", - version="1.0.1", + version="1.1.0", description="Singer.io target for writing CSV files and upload to S3 - PipelineWise compatible", author="TransferWise", url='https://github.com/transferwise/pipelinewise-target-s3-csv', diff --git a/tests/integration/test_target_s3_csv.py b/tests/integration/test_target_s3_csv.py index 1fca796..3e26686 100644 --- a/tests/integration/test_target_s3_csv.py +++ b/tests/integration/test_target_s3_csv.py @@ -68,16 +68,16 @@ def test_loading_csv_files_with_gzip_compression(self): """Loading multiple tables from the same input tap with gzip compression""" tap_lines = test_utils.get_test_tap_lines('messages-with-three-streams.json') - # Turning off compression + # Turning on gzip compression self.config['compression'] = 'gzip' self.persist_messages(tap_lines) self.assert_three_streams_are_in_s3_bucket(compression='gzip') - def test_loading_csv_files_with_gzip_compression(self): - """Loading multiple tables from the same input tap with gzip compression""" + def test_loading_csv_files_with_invalid_compression(self): + """Loading multiple tables from the same input tap with invalid compression""" tap_lines = test_utils.get_test_tap_lines('messages-with-three-streams.json') - # Turning off compression + # Turning on a not supported compression method self.config['compression'] = 'INVALID_COMPRESSION_METHOD' # Invalid compression method should raise exception