File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : pre-commit
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches : [master, dev]
7+
8+ jobs :
9+ pre-commit :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v3
14+ - name : Install Python
15+ uses : actions/setup-python@v3
16+ - name : Install poetry
17+ run : python -m pip install poetry
18+
19+ - name : Configure poetry
20+ run : python -m poetry config virtualenvs.in-project true
21+
22+ - name : Cache the virtualenv
23+ id : cache-venv
24+ uses : actions/cache@v3
25+ with :
26+ path : ./.venv
27+ key : ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}
28+
29+ - name : Install dependencies
30+ if : steps.cache-venv.outputs.cache-hit != 'true'
31+ run : python -m poetry install
32+
33+ - name : Run pre-commit
34+ run : pre-commit run --show-diff-on-failure --color=always --all-files
35+ shell : bash
Original file line number Diff line number Diff line change 1+ [virtualenvs ]
2+ create = true
3+ in-project = true
You can’t perform that action at this time.
0 commit comments