-
Notifications
You must be signed in to change notification settings - Fork 8
104 lines (86 loc) · 2.6 KB
/
functional_test_2.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Functional (pip)
on:
push:
branches:
- 'main'
paths:
- '**.py'
- '.github/workflows/*.yml'
- 'pyproject.toml'
- 'setup.py'
- 'setup.cfg'
pull_request:
paths:
- '**.py'
- '.github/workflows/*.yml'
- 'pyproject.toml'
- 'setup.py'
- 'setup.cfg'
jobs:
basic-functional-tests-using-pip:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.10', '3.11' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: OS binaries
shell: bash -l {0}
run: |
sudo apt update
sudo apt install gdal-bin
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
shell: bash -l {0}
run: |
pip install packaging # jigsaw dependency in its setup.py
python ./setup.py install_jigsaw
pip install .
- name: Prepare example DEM
shell: bash -l {0}
run: |
wget https://coast.noaa.gov/htdata/raster2/elevation/NCEI_ninth_Topobathy_2014_8483/northeast_sandy/ncei19_n40x75_w073x75_2015v1.tif -O /tmp/fullsize_dem.tif
gdalwarp -tr 0.0005 0.0005 -r average -overwrite /tmp/fullsize_dem.tif /tmp/test_dem.tif
- name: 'Upload test dem'
uses: actions/upload-artifact@v4
with:
name: test-dem-${{ matrix.python-version }}
path: /tmp/test_dem.tif
retention-days: 7
- name: Run geom build test
shell: bash -l {0}
run: source tests/cli/build_geom.sh
- name: 'Upload Geom build results'
uses: actions/upload-artifact@v4
with:
name: geom-build-results-${{ matrix.python-version }}
path: test_shape
retention-days: 7
- name: Run hfun build test
shell: bash -l {0}
run: source tests/cli/build_hfun.sh
- name: 'Upload Hfun build results'
uses: actions/upload-artifact@v4
with:
name: hfun-build-results-${{ matrix.python-version }}
path: test.2dm
retention-days: 7
- name: Run remesh test
shell: bash -l {0}
run: source tests/cli/remesh_by_dem.sh
- name: 'Upload remesh results'
uses: actions/upload-artifact@v4
with:
name: remesh-bydem-results-${{ matrix.python-version }}
path: remeshed.2dm
retention-days: 7
- name: Run Python API tests
shell: bash -l {0}
run: python -m unittest discover tests/api -p "*.py"