Merge pull request #939 from tgupta3/vcenter-inventory #1531
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: linting | |
on: | |
push: | |
# run on push only in master, develop, version specific and hotfix branches | |
branches: | |
- master | |
- develop | |
- '[0-9].[0-9]+.[0-9]+.?[0-9]?' | |
pull_request: | |
# run on branches having an open PR | |
branches: | |
- '**' | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
linter: [pylint, flake8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
architecture: 'x64' | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-3.8-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- name: Install suzieq | |
run: poetry install --no-interaction | |
- name: Run linter | |
run: poetry run ${{ matrix.linter }} suzieq/ |