This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
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
5 changed files
with
88 additions
and
43 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,37 +1,23 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
integration_tests: | ||
docker: | ||
- image: circleci/python:3.6.2 | ||
steps: | ||
- checkout | ||
|
||
- run: | ||
name: install dependencies | ||
command: | | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
pip install --upgrade pip setuptools wheel | ||
pip install .[test] | ||
- run: | ||
name: 'Check code formatting and do pylinting' | ||
command: | | ||
. venv/bin/activate | ||
echo "Checking double quotes..." | ||
find tap_snowflake tests -type f -name '*.py' | xargs unify --check-only | ||
echo "Running pylint..." | ||
pylint tap_snowflake tests | ||
command: make venv | ||
|
||
- run: | ||
name: 'Integration Tests' | ||
command: | | ||
. venv/bin/activate | ||
export LOGGING_CONF_FILE=$(pwd)/sample_logging.conf | ||
nosetests --where=tests/integration/ | ||
make integration_test | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- build | ||
- integration_tests |
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,37 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint_and_test: | ||
name: Linting and Testing | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ 3.6, 3.7, 3.8 ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup virtual environment | ||
run: make venv | ||
|
||
- name: Code formatting | ||
run: make format | ||
|
||
- name: Pylinting | ||
run: make pylint | ||
|
||
# No unit tests :( | ||
# - name: Unit Tests | ||
# run: make unit_test |
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,21 @@ | ||
venv: | ||
python3 -m venv venv ;\ | ||
. ./venv/bin/activate ;\ | ||
pip install --upgrade pip setuptools wheel ;\ | ||
pip install -e .[test] | ||
|
||
format: | ||
. ./venv/bin/activate ;\ | ||
find tap_snowflake tests -type f -name '*.py' | xargs unify --check-only | ||
|
||
pylint: | ||
. ./venv/bin/activate ;\ | ||
pylint --rcfile pylintrc tap_snowflake/ | ||
|
||
unit_test: | ||
. ./venv/bin/activate ;\ | ||
pytest tests/unit | ||
|
||
integration_test: | ||
. ./venv/bin/activate ;\ | ||
pytest tests/integration/ -vv --cov tap_snowflake |
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