diff options
author | 2021-03-10 17:53:16 +0000 | |
---|---|---|
committer | 2021-03-10 17:53:16 +0000 | |
commit | 96d01477ba311b7fc29294bc1c502e816850e931 (patch) | |
tree | d71c61cc2f65a8d03f2a8bcd785b7419985f4a07 | |
parent | Alter pull request template (diff) |
Alter linting workflow
-rw-r--r-- | .github/workflows/lint.yaml | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a5f45255..4f7d775a 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -16,13 +16,6 @@ jobs: PIP_NO_CACHE_DIR: false PIP_USER: 1 - # Hide the graphical elements from pipenv's output - PIPENV_HIDE_EMOJIS: 1 - PIPENV_NOSPIN: 1 - - # Make sure pipenv does not try reuse an environment it's running in - PIPENV_IGNORE_VIRTUALENVS: 1 - # Specify explicit paths for python dependencies and the pre-commit # environment so we know which directories to cache PYTHONUSERBASE: ${{ github.workspace }}/.cache/py-user-base @@ -54,14 +47,14 @@ jobs: path: ${{ env.PYTHONUSERBASE }} key: "python-0-${{ runner.os }}-${{ env.PYTHONUSERBASE }}-\ ${{ steps.python.outputs.python-version }}-\ - ${{ hashFiles('./Pipfile', './Pipfile.lock') }}" + ${{ hashFiles('./pyproject.toml', './poetry.lock') }}" # Install our dependencies if we did not restore a dependency cache - - name: Install dependencies using pipenv + - name: Install dependencies using poetry if: steps.python_cache.outputs.cache-hit != 'true' run: | - pip install pipenv - pipenv install --dev --deploy --system + pip install poetry + poetry install --no-interaction --no-ansi # This step caches our pre-commit environment. To make sure we # do create a new environment when our pre-commit setup changes, @@ -78,7 +71,7 @@ jobs: # action. As pre-commit does not support user installs, we set # PIP_USER=0 to not do a user install. - name: Run pre-commit hooks - run: export PIP_USER=0; SKIP=flake8 pre-commit run --all-files + run: export PIP_USER=0; SKIP=flake8 poetry run pre-commit run --all-files # Run flake8 and have it format the linting errors in the format of # the GitHub Workflow command to register error annotations. This @@ -89,7 +82,7 @@ jobs: # Format used: # ::error file={filename},line={line},col={col}::{message} - name: Run flake8 - run: "flake8 \ + run: "poetry run flake8 \ --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'" # Prepare the Pull Request Payload artifact. If this fails, we |