diff --git a/.github/workflows/lint-library-generator.yml b/.github/workflows/lint-library-generator.yml index 44d3f55e..14d94ad4 100644 --- a/.github/workflows/lint-library-generator.yml +++ b/.github/workflows/lint-library-generator.yml @@ -27,14 +27,22 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + - name: Set up pipenv + uses: actions/cache@v2 + with: + path: ~/.local/share/virtualenvs + key: ${{ runner.os }}-pipenv-${{ hashfiles('**/Pipfile.lock') }} + restore-keys: | + ${{ runner.os }}-pipenv- - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + python -m pip install pipenv + pipenv install --deploy + pipenv install flake8 pytest - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 ./generator/generate_library.py --count --select=E9,F63,F7,F82 --ignore=F405,W391,W291,C901,E501,E303,W293 --show-source --statistics + pipenv run flake8 ./generator/generate_library.py --count --select=E9,F63,F7,F82 --ignore=F405,W391,W291,C901,E501,E303,W293 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics \ No newline at end of file + pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics