From 5b14ed0c97560ac32e11d461368c9f01b713a684 Mon Sep 17 00:00:00 2001 From: Samira El Aabidi <54845154+Samira-El@users.noreply.github.com> Date: Wed, 16 Jun 2021 15:09:02 +0300 Subject: [PATCH] [WIP] Clean Up & use GHA for CI (#76) --- .circleci/config.yml | 36 ------------------------------ .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ requirements.txt | 5 ----- 3 files changed, 47 insertions(+), 41 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 requirements.txt diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index b1e543d..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: 2 -jobs: - build: - 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 - pip install .[test] - - - run: - name: 'Pylinting' - command: | - . venv/bin/activate - pylint target_redshift -d C,W,unexpected-keyword-arg,duplicate-code - - - run: - name: 'Unit and Integration Tests and Coverage' - command: | - . venv/bin/activate - export LOGGING_CONF_FILE=./sample_logging.conf - coverage run -m pytest -vv --disable-pytest-warnings tests - coverage report - coverage html -d coverage_html - -workflows: - version: 2 - build: - jobs: - - build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..99dfa6e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + + workflow_dispatch: + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + python-version: [3.6, 3.7, 3.8] + + steps: + - name: Checking out repo + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.container[1] }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: set LOGGING_CONF_FILE env + run: | + export LOGGING_CONF_FILE=$(pwd)/sample_logging.conf + echo $LOGGING_CONF_FILE + + - name: Install dependencies + run: | + pip install --upgrade pip setuptools wheel + pip install .[test] + + - name: Check if pylint is happy + run: pylint target_redshift -d C,W,unexpected-keyword-arg,duplicate-code + + - name: Run Unit Tests + run: pytest -v --disable-pytest-warnings tests/unit +# +# No redshift instance to run these against +# - name: Run Integration Tests +# run: pytest -v --disable-pytest-warnings -v tests/integration diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 028514f..0000000 --- a/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -singer-python==5.7.0 -boto3==1.9.188 -psycopg2==2.8.3 -inflection==0.3.1 -joblib==0.13.2 \ No newline at end of file