Skip to content

Issue #296

Issue #296 #532

Workflow file for this run

# This workflow will run isort and black linters on PRs
name: lint
# on: workflow_dispatch
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
run_lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- uses: actions/cache@v2
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('REQUIREMENTS.txt') }}-${{ hashFiles('./requirements/DEV_REQUIREMENTS.txt') }}-${{ hashFiles('./requirements/S3_REQUIREMENTS.txt') }}-${{ hashFiles('./requirements/TUNE_REQUIREMENTS.txt') }}-${{ hashFiles('./requirements/TEST_EXTRAS_REQUIREMENTS_REQUIREMENTS.txt') }}
- name: Install dependencies and dev dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r ./requirements/DEV_REQUIREMENTS.txt
pip install -r ./requirements/S3_REQUIREMENTS.txt
pip install -r ./requirements/TUNE_REQUIREMENTS.txt
pip install -r ./requirements/TEST_EXTRAS_REQUIREMENTS.txt
- name: Run isort linter
run: |
isort --check .
- name: Run black linter
run: |
black --check .