|
31 | 31 | with: |
32 | 32 | python-version: ${{ env.PYTHON_VERSION }} |
33 | 33 |
|
34 | | - # This step caches our Python dependencies. To make sure we |
35 | | - # only restore a cache when the dependencies, the python version and |
36 | | - # the runner operating system we create a cache key |
37 | | - # that is a composite of those states. |
38 | | - # Only when the context is exactly the same, we will restore the cache. |
39 | | - - name: Restore pip cache |
40 | | - uses: actions/cache@v2 |
41 | | - with: |
42 | | - path: ${{ env.PIP_CACHE_DIR }} |
43 | | - key: "python-pip-${{ runner.os }}-\ |
44 | | - ${{ steps.python.outputs.python-version }}-\ |
45 | | - ${{ hashFiles('./Pipfile', './Pipfile.lock') }}" |
46 | | - |
47 | | - # Uncomment the step that matches your setup. |
48 | | - |
49 | | - # Default Env setup |
50 | | - - name: Run hooks through our requirement file |
51 | | - run: | |
52 | | - pip install -r dev-requirements.txt |
53 | | - pre-commit run --all-files |
54 | | - env: |
55 | | - # Force pre-commit to do a system install. |
56 | | - PIP_USER: 0 |
57 | | - |
58 | | - # Pipenv setup |
59 | | - # - name: Run hooks through our Pipenv environment. |
60 | | - # run: | |
61 | | - # pipenv install --system --dev |
62 | | - # pipenv run python -m pre-commit run --all-files |
63 | | - # env: |
64 | | - # # Force pre-commit to do a system install. |
65 | | - # PIP_USER: 0 |
66 | | - |
67 | | - # Poetry setup |
68 | | - # - name: Run hooks through our Poetry environment. |
69 | | - # run: | |
70 | | - # poetry install |
71 | | - # poetry run python -m pre-commit run --all-files |
72 | | - # env: |
73 | | - # # Force pre-commit to do a system install. |
74 | | - # PIP_USER: 0 |
| 34 | + - name: Run pre-commit hooks. |
| 35 | + uses: pre-commit/action@v2.0.3 |
0 commit comments