Skip to content

Incorporate only used connectors into main codebase #652

Incorporate only used connectors into main codebase

Incorporate only used connectors into main codebase #652

Workflow file for this run

name: Lint and Unit Tests
on:
pull_request:
branches: [master]
workflow_dispatch:
concurrency:
group: lint_unit_tests-${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint_and_test:
runs-on: ubuntu-20.04
steps:
- name: Checking out repo
uses: actions/checkout@v4.1.7
- name: Check if python changes are present
id: check
env:
GITHUB_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
continue-on-error: true
run: ./scripts/ci_check_no_file_changes.sh python
- name: Set up Python 3.8
if: steps.check.outcome == 'failure'
uses: actions/setup-python@v5.1.0
with:
python-version: '3.8'
- name: Install dependencies
if: steps.check.outcome == 'failure'
run: make pipelinewise
- name: Check code formatting
if: steps.check.outcome == 'failure'
run: |
. dev-project/.virtualenvs/pipelinewise/bin/activate
find pipelinewise tests -type f -name '*.py' | xargs unify --check-only
- name: Pylinting
if: steps.check.outcome == 'failure'
run: |
. dev-project/.virtualenvs/pipelinewise/bin/activate
pylint pipelinewise tests
- name: Pep8
if: steps.check.outcome == 'failure'
run: |
. dev-project/.virtualenvs/pipelinewise/bin/activate
flake8 pipelinewise --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Pep8 complexity
if: steps.check.outcome == 'failure'
run: |
. dev-project/.virtualenvs/pipelinewise/bin/activate
flake8 pipelinewise --count --max-complexity=15 --max-line-length=120 --statistics
- name: Run Unit tests
if: steps.check.outcome == 'failure'
run: |
. dev-project/.virtualenvs/pipelinewise/bin/activate
pytest --cov=pipelinewise --cov-fail-under=77 -v tests/units