Skip to content

Commit 13a4dcf

Browse files
committed
Update pyproject template
1 parent 9b23740 commit 13a4dcf

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,19 @@ jobs:
3535
run: npx playwright install --with-deps
3636
# === pyproject-tmpl: end "pre-test" ===
3737
- name: Set up Python ${{ matrix.python-version }}
38+
id: setup-python
3839
uses: actions/setup-python@v7
3940
with:
4041
python-version: ${{ matrix.python-version }}
4142
- name: Cache venv
4243
uses: actions/cache@v6
4344
with:
4445
path: .venv
45-
key: ${{ runner.os }}-${{ matrix.python-version }}-venv-${{ hashFiles('pyproject.toml') }}
46+
key: ${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-venv-${{ hashFiles('pyproject.toml') }}
4647
- name: Set up venv
47-
run: make venv
48+
run: |
49+
.venv/bin/python -V >/dev/null 2>&1 || rm -rf .venv
50+
make venv
4851
- name: Typecheck
4952
run: make typecheck
5053
- name: Lint
@@ -60,3 +63,4 @@ jobs:
6063
path: fail_*.png
6164
if-no-files-found: ignore
6265
# === pyproject-tmpl: end "post-test" ===
66+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ __pycache__
1111
/.pytest_cache
1212
/.venv
1313
/*.egg-info
14+
/Makefile.local
1415

1516
# === pyproject-tmpl: start "extras" ===
1617
ghostdriver.log

Makefile.pyproject

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,8 @@ venv: | $(VENV)/$(MARKER)-dev
408408
$(VENV)/$(MARKER)-dev: $(VENV)/$(MARKER)
409409
$(VENV)/pip install -e .[dev]
410410
touch $@
411+
412+
413+
## Optional per-checkout overrides (not managed by the template, git-ignored)
414+
415+
-include Makefile.local

0 commit comments

Comments
 (0)