-
Notifications
You must be signed in to change notification settings - Fork 11
64 lines (59 loc) · 2.94 KB
/
main.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: build ⚙️
on: [ push, pull_request ]
env:
DEBIAN_FRONTEND: noninteractive
GEOMET_CLIMATE_BASEDIR: _build
GEOMET_CLIMATE_CONFIG: tests/geomet-climate-test.yml
GEOMET_CLIMATE_DATADIR: tests/data/climate
GEOMET_CLIMATE_URL: http://localhost:8099/
PYTHONPATH: /usr/lib/python3/dist-packages
jobs:
main:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Setup Python ${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies 📦
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install -y git curl dh-python debhelper devscripts fakeroot
sudo apt-get install -y gdal-bin libgdal-dev mapserver-bin python3-all python3-pip python3-click python3-gdal python3-mappyfile python3-mapscript python3-matplotlib python3-numpy python3-pyproj python3-yaml proj-bin proj-data
- name: Install requirements 📦
run: |
sudo pip3 install pip -U
sudo pip3 install GDAL==`gdalinfo --version | cut -d' ' -f2 | cut -d',' -f1`
sudo pip3 install --ignore-installed -r requirements.txt
sudo pip3 install --ignore-installed -r requirements-dev.txt
- name: Install package 📦
run: |
sudo python3 setup.py install
- name: run tests ⚙️
run: |
mapserv -v
sudo -E python3 tests/run_tests.py
sudo -E geomet-climate vrt generate
sudo -E geomet-climate tileindex generate
sudo -E geomet-climate legend generate
sudo -E geomet-climate mapfile generate -s WMS
sudo -E geomet-climate mapfile generate -s WCS
sudo -E mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WMS-en.map&service=WMS&version=1.3.0&request=GetCapabilities" > /tmp/geomet-climate-WMS-1.3.0-capabilities-en.xml
sudo -E mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WMS-fr.map&lang=fr&service=WMS&version=1.3.0&request=GetCapabilities" > /tmp/geomet-climate-WMS-1.3.0-capabilities-fr.xml
sudo -E mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WCS-en.map&service=WCS&version=2.1.0&request=GetCapabilities" > /tmp/geomet-climate-WCS-2.0.1-capabilities-en.xml
sudo -E mapserv -nh QUERY_STRING="map=$GEOMET_CLIMATE_BASEDIR/mapfile/geomet-climate-WCS-fr.map&lang=fr&service=WCS&version=2.1.0&request=GetCapabilities" > /tmp/geomet-climate-WCS-2.0.1-capabilities-fr.xml
- name: run flake8
run: flake8
- name: build Python package 🏗️
run: |
sudo -E python3 setup.py cleanbuild
sudo -E python3 setup.py bdist_wheel --universal
- name: build Debian package 🏗️
run: sudo -E debuild -b -uc -us