[AP-1873] bump to Python 3.10 #682
Workflow file for this run
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
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/[email protected] | |
- 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.10 | |
if: steps.check.outcome == 'failure' | |
uses: actions/[email protected] | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
if: steps.check.outcome == 'failure' | |
run: make pipelinewise | |
- name: Check code formatting | |
if: steps.check.outcome == 'failure' | |
run: | | |
. .virtualenvs/pipelinewise/bin/activate | |
find pipelinewise tests -type f -name '*.py' | xargs unify --check-only | |
- name: Pylinting | |
if: steps.check.outcome == 'failure' | |
run: | | |
. .virtualenvs/pipelinewise/bin/activate | |
pylint pipelinewise tests | |
- name: Pep8 | |
if: steps.check.outcome == 'failure' | |
run: | | |
. .virtualenvs/pipelinewise/bin/activate | |
flake8 pipelinewise --count --select=E9,F63,F7,F82 --show-source --statistics | |
- name: Pep8 complexity | |
if: steps.check.outcome == 'failure' | |
run: | | |
. .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: | | |
. .virtualenvs/pipelinewise/bin/activate | |
pytest --cov=pipelinewise --cov-fail-under=77 -v tests/units |