Skip to content

Implement usermap exponential backoff (INF-1310) #35

Implement usermap exponential backoff (INF-1310)

Implement usermap exponential backoff (INF-1310) #35

Workflow file for this run

name: Run Python linters
on: [push, pull_request]
jobs:
python-files:
runs-on: ubuntu-20.04
outputs:
filelist: ${{ steps.python-files.outputs.filelist }}
steps:
- uses: actions/checkout@v2
- id: python-files
run: |
echo "::set-output name=filelist::$(find . -type f -exec awk ' /^#!.*python/{print FILENAME} {nextfile}' {} + | tr '\n' ' ')"
pylint:
runs-on: ubuntu-20.04
needs: [python-files]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6.15
- uses: actions/cache@v2
with:
path: ~/pip-cache
key: pip-3.6-${{ github.sha }}
# allow cache hits from previous runs of the current branch,
# parent branch, then upstream branches, in that order
restore-keys: |
pip-3.6-
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip --cache-dir ~/pip-cache install pylint
- name: Run Pylint
env:
PYTHON_FILES: ${{ needs.python-files.outputs.filelist }}
run: |
pylint --errors-only $PYTHON_FILES
flake8:
runs-on: ubuntu-20.04
needs: [python-files]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6.15
- uses: actions/cache@v2
with:
path: ~/pip-cache
key: pip-3.6-${{ github.sha }}
# allow cache hits from previous runs of the current branch,
# parent branch, then upstream branches, in that order
restore-keys: |
pip-3.6-
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip --cache-dir ~/pip-cache install flake8
- name: Run flake8
env:
PYTHON_FILES: ${{ needs.python-files.outputs.filelist }}
run: | # Change PYTHONPATH for different repo
export PYTHONPATH=$PYTHONPATH:$PWD/src/scripts
flake8 --select F $PYTHON_FILES