-
Notifications
You must be signed in to change notification settings - Fork 130
63 lines (59 loc) · 2.08 KB
/
e2etest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: e2etest
on: [push]
jobs:
geocoder:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Expand geocache
run: |
tar -xzf geocache.tgz
- name: Run geocoder
run: |
PYTHONPATH=. poetry run oldnyc/geocode/geocode.py --ids_filter test/random200-ids.txt --images_ndjson data/images.ndjson --output_format id-location.txt --geocode > >(tee test/random200-geocoded.txt) 2> >(tee test/random200.logs.txt >&2)
# See https://stackoverflow.com/a/692407/388951 for the stdout/stderr redirection
- name: Check for diffs
run: |
git diff --exit-code test/
cropper:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Run cropper
run: |
poetry run ocr/crop_morphology.py --beta 2 --overwrite test/721675b.jpg
poetry run ocr/crop_morphology.py --beta 2 --overwrite --border_only --output_pattern '%s.border.jpg' test/721675b.jpg
- name: Run photo detector
run: |
poetry run nyc/find_pictures.py test/*f.jpg > test/detected-photos.ndjson
- name: Check for diffs
run: |
git diff --exit-code test/
generation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Clone web site
run: |
cd ..
git clone https://github.com/oldnyc/oldnyc.github.io.git
- name: Run ingestion
run: |
PYTHONPATH=. poetry run oldnyc/ingest/ingest.py
- name: Check for diffs
run: |
git diff --exit-code data/
- name: Generate static site
run: |
export PYTHONPATH=.
poetry run ./nyc/crops-to-json.py nyc/crops.txt > /tmp/crops.json
poetry run ./nyc/records_to_photos.py data/images.ndjson /tmp/crops.json data/photos.ndjson
echo '{"fixes": {}}' > ocr/feedback/fixes.json
poetry run oldnyc/site/generate_static_site.py --leave-timestamps-unchanged
- name: Check for diffs
run: |
cd ../oldnyc.github.io
git diff --exit-code