forked from linz/topo-imagery
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 2.92 KB
/
format.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
name: Format and Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Python "3.10.6"
uses: actions/setup-python@v4
with:
python-version: "3.10.6"
- name: Install
run: |
pip install poetry
poetry install
- name: Format
run: |
poetry run pre-commit run --all-files
- name: Unit Tests
run: |
poetry run pytest .
- name: Build containers
run: |
docker build . --tag topo-imagery --label "github_run_id=${GITHUB_RUN_ID}"
- name: End to end test - Aerial Imagery
run: |
docker run -v ${HOME}/tmp/:/tmp/ topo-imagery python3 standardise_validate.py --from-file ./tests/data/aerial.json --preset webp --target-epsg 2193 --source-epsg 2193 --target /tmp/ --collection-id 123 --start-datetime 2023-01-01 --end-datetime 2023-01-01
cmp --silent ${HOME}/tmp/BG35_1000_4829.tiff ./scripts/tests/data/output/BG35_1000_4829.tiff
- name: End to end test - Elevation
run: |
docker run -v ${HOME}/tmp/:/tmp/ topo-imagery python3 standardise_validate.py --from-file ./tests/data/dem.json --preset dem_lerc --target-epsg 2193 --source-epsg 2193 --target /tmp/ --collection-id 123 --start-datetime 2023-01-01 --end-datetime 2023-01-01
cmp --silent ${HOME}/tmp/BK39_10000_0102.tiff ./scripts/tests/data/output/BK39_10000_0102.tiff
cmp --silent ${HOME}/tmp/BK39_10000_0101.tiff ./scripts/tests/data/output/BK39_10000_0101.tiff
- name: End to end test - Historical Aerial Imagery
run: |
docker run -v ${HOME}/tmp/:/tmp/ topo-imagery python3 standardise_validate.py --from-file ./tests/data/hi.json --preset webp --target-epsg 2193 --source-epsg 2193 --target /tmp/ --collection-id 123 --start-datetime 2023-01-01 --end-datetime 2023-01-01
cmp --silent ${HOME}/tmp/BQ31_5000_0608.tiff ./scripts/tests/data/output/BQ31_5000_0608.tiff
- name: End to end test - Cutline (Aerial Imagery)
run: |
docker run -v ${HOME}/tmp/:/tmp/ topo-imagery python3 standardise_validate.py --from-file ./tests/data/aerial.json --preset webp --target-epsg 2193 --source-epsg 2193 --target /tmp/cutline/ --collection-id 123 --start-datetime 2023-01-01 --end-datetime 2023-01-01 --cutline ./tests/data/cutline_aerial.fgb
cmp --silent ${HOME}/tmp/cutline/BG35_1000_4829.tiff ./scripts/tests/data/output/BG35_1000_4829_cut.tiff
- name: End to end test - Thumbnails (Topo50/Topo250)
run: |
docker run -v ${HOME}/tmp/:/tmp/ topo-imagery python3 thumbnails.py --from-file ./tests/data/thumbnails.json --target /tmp/
cmp --silent ${HOME}/tmp/CB07_GeoTifv1-02-thumbnail.jpg ./scripts/tests/data/output/CB07_GeoTifv1-02-thumbnail.jpg
cmp --silent ${HOME}/tmp/CB07_TIFFv1-02-thumbnail.jpg ./scripts/tests/data/output/CB07_TIFFv1-02-thumbnail.jpg