Skip to content

Commit 4d7f1f3

Browse files
Update lint-library-generator.yml
Updated to use pipenv.
1 parent 335da35 commit 4d7f1f3

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/lint-library-generator.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,22 @@ jobs:
2727
uses: actions/setup-python@v3
2828
with:
2929
python-version: ${{ matrix.python-version }}
30+
- name: Set up pipenv
31+
uses: actions/cache@v2
32+
with:
33+
path: ~/.local/share/virtualenvs
34+
key: ${{ runner.os }}-pipenv-${{ hashfiles('**/Pipfile.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-pipenv-
3037
- name: Install dependencies
3138
run: |
3239
python -m pip install --upgrade pip
33-
python -m pip install flake8 pytest
34-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
40+
python -m pip install pipenv
41+
pipenv install --deploy
42+
pipenv install flake8 pytest
3543
- name: Lint with flake8
3644
run: |
3745
# stop the build if there are Python syntax errors or undefined names
38-
flake8 ./generator/generate_library.py --count --select=E9,F63,F7,F82 --ignore=F405,W391,W291,C901,E501,E303,W293 --show-source --statistics
46+
pipenv run flake8 ./generator/generate_library.py --count --select=E9,F63,F7,F82 --ignore=F405,W391,W291,C901,E501,E303,W293 --show-source --statistics
3947
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
40-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
48+
pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

0 commit comments

Comments
 (0)