Skip to content

Commit 1df78d4

Browse files
use poetry as the runner
1 parent 0d846b8 commit 1df78d4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/lint_test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ jobs:
6161
# changed, we create a cache key that is a composite of those states.
6262
#
6363
# Only when the context is exactly the same, we will restore the cache.
64-
- name: Python Dependency Caching
65-
uses: actions/cache@v2
66-
id: python_cache
67-
with:
68-
path: ${{ env.PYTHONUSERBASE }}
69-
key: "python-0-${{ runner.os }}-${{ env.PYTHONUSERBASE }}-\
70-
${{ steps.python.outputs.python-version }}-\
71-
${{ hashFiles('./pyproject.toml', './poetry.lock') }}"
64+
# - name: Python Dependency Caching
65+
# uses: actions/cache@v2
66+
# id: python_cache
67+
# with:
68+
# path: ${{ env.PYTHONUSERBASE }}
69+
# key: "python-0-${{ runner.os }}-${{ env.PYTHONUSERBASE }}-\
70+
# ${{ steps.python.outputs.python-version }}-\
71+
# ${{ hashFiles('./pyproject.toml', './poetry.lock') }}"
7272

7373
# Install our dependencies if we did not restore a dependency cache
7474
- name: Install dependencies using poetry
75-
if: steps.python_cache.outputs.cache-hit != 'true'
75+
# if: steps.python_cache.outputs.cache-hit != 'true'
7676
run: |
7777
pip install poetry
7878
poetry install --no-interaction --no-ansi
@@ -93,14 +93,14 @@ jobs:
9393
# we set PIP_USER=0 to not do a user install.
9494
- name: Run pre-commit hooks
9595
id: pre-commit
96-
run: export PIP_USER=0; SKIP="no-commit-to-branch,black,flake8" pre-commit run --all-files
96+
run: export PIP_USER=0; SKIP="no-commit-to-branch,black,flake8" poetry run pre-commit run --all-files
9797

9898
# Run black seperately as we don't want to reformat the files
9999
# just error if something isn't formatted correctly.
100100
- name: Check files with black
101101
id: black
102102
if: always() && (steps.pre-commit.outcome == 'success' || steps.pre-commit.outcome == 'failure')
103-
run: black . --check --diff --color
103+
run: poetry run black . --check --diff --color
104104

105105
# Run flake8 and have it format the linting errors in the format of
106106
# the GitHub Workflow command to register error annotations. This
@@ -113,7 +113,7 @@ jobs:
113113
- name: Run flake8
114114
id: flake8
115115
if: always() && (steps.pre-commit.outcome == 'success' || steps.pre-commit.outcome == 'failure')
116-
run: "flake8 \
116+
run: "poetry run flake8 \
117117
--format='::error file=%(path)s,line=%(row)d,col=%(col)d::\
118118
[flake8] %(code)s: %(text)s'"
119119

0 commit comments

Comments
 (0)