Skip to content

Commit d08366e

Browse files
committed
add (failing) test for checksums
1 parent 65f7d88 commit d08366e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/nikola.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v2
2020
- name: Build docs
2121
shell: bash
22-
run: |
22+
run: python3 check_checksums.py
2323
sudo apt install virtualenv
2424
make build
2525
- name: Deploy

check_checksums.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env python3
2+
3+
def main(fname):
4+
5+
with open(fname) as fid:
6+
for line in fid:
7+
if line.startswith(' '):
8+
parts = line.strip().split(' ')
9+
if len(parts[0]) != 3:
10+
raise ValueError(f'bad checksum in {line}')
11+
12+
if __name__ == "__main__":
13+
main('pages/checksums.rst')
14+

0 commit comments

Comments
 (0)