Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from qitianshi/config-pylint-workflow
Browse files Browse the repository at this point in the history
Optimize GitHub Actions workflows with Python venv caching
  • Loading branch information
qitianshi authored Dec 16, 2021
2 parents 25c3110 + f6712c1 commit 8378258
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ jobs:
- uses: actions/cache@v2
id: cache-venv
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}

- name: Install dependencies
path: ./venv/
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-venv-
- name: Create Python venv and install dependencies
run: python3 -m venv ./venv && . ./venv/bin/activate &&
pip install -r requirements.txt && python3 -m pip install pylint
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install pylint
pip install --upgrade --upgrade-strategy eager -r requirements.txt

- name: Analysing the code with pylint
- name: Analysing with pylint
# Runs Pylint, disables refactor (R) messages and TODO/FIXME warnings (W0511)
run: |
pylint analysis --disable=R --disable=W0511
. ./venv/bin/activate && pylint analysis --disable=R --disable=W0511

0 comments on commit 8378258

Please sign in to comment.