Skip to content

Commit 741cbd0

Browse files
committed
build: check how recent the nightly builds are
1 parent c3c91f1 commit 741cbd0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/python-nightly.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,22 @@ jobs:
110110
python -m coverage debug pybehave
111111
env | sort
112112
113+
- name: "Check build recency"
114+
#if: "!startsWith(matrix.python-version, 'pypy-')"
115+
shell: python
116+
run: |
117+
import platform
118+
from datetime import datetime
119+
for fmt in ["%b %d %Y %H:%M:%S", "%b %d %Y"]:
120+
try:
121+
built = datetime.strptime(platform.python_build()[1], fmt)
122+
except ValueError:
123+
continue
124+
now = datetime.now()
125+
days = (now - built).days
126+
print(f"Days since Python was built: {days}")
127+
assert days <= 7
128+
113129
- name: "Install dependencies"
114130
run: |
115131
python -m pip install -r requirements/tox.pip

0 commit comments

Comments
 (0)