Skip to content

Commit 2207cf6

Browse files
committed
Cleaning display and add test for pressurepath
1 parent 9ca17f3 commit 2207cf6

1 file changed

Lines changed: 61 additions & 8 deletions

File tree

.github/workflows/test-server.yml

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,70 @@
1-
name: Test Server
1+
name: Test GeoPressure API Server
22

3+
# This workflow runs every 12 hours and can also be triggered manually
34
on:
45
schedule:
5-
- cron: '0 */12 * * *'
6+
- cron: "0 */12 * * *" # Runs at minute 0 every 12th hour
67
workflow_dispatch:
78

89
jobs:
9-
build:
10+
run-api-tests:
1011
runs-on: ubuntu-latest
12+
1113
steps:
12-
- name: Test v2/map
13-
run: 'curl -X POST "https://glp.mgravey.com/GeoPressure/v2/map/" -H "Content-Type: application/json" -d ''{"W": -18, "S": 4, "E": 16, "N": 51, "time": [1572075000, 1572076800, 1572078600], "pressure": [97766, 97800, 97833], "label": [1, 1, 1]}'' --max-time 60'
14+
# Test GeoPressure v2/map endpoint
15+
- name: Test v2/map endpoint
16+
run: |
17+
curl -X POST "https://glp.mgravey.com/GeoPressure/v2/map/" \
18+
-H "Content-Type: application/json" \
19+
-d '{
20+
"W": -18,
21+
"S": 4,
22+
"E": 16,
23+
"N": 51,
24+
"time": [1572075000, 1572076800, 1572078600],
25+
"pressure": [97766, 97800, 97833],
26+
"label": [1, 1, 1]
27+
}' \
28+
--max-time 60
29+
30+
# Test GeoPressure v2/timeseries endpoint using startTime and endTime
1431
- name: Test v2/timeseries with startTime and endTime
15-
run: 'curl -X POST "https://glp.mgravey.com/GeoPressure/v2/timeseries/" -H "Content-Type: application/json" -d ''{"lon": 6, "lat": 46, "startTime": 1497916800, "endTime": 1500667800}'' --max-time 60'
16-
- name: Test v2/timeseries with pressure timeseries
17-
run: 'curl -X POST "https://glp.mgravey.com/GeoPressure/v2/timeseries/" -H "Content-Type: application/json" -d ''{"lon": 6, "lat": 46, "time": [1572075000, 1572076800, 1572078600], "pressure": [97766, 97800, 97833]}'' --max-time 60'
32+
run: |
33+
curl -X POST "https://glp.mgravey.com/GeoPressure/v2/timeseries/" \
34+
-H "Content-Type: application/json" \
35+
-d '{
36+
"lon": 6,
37+
"lat": 46,
38+
"startTime": 1497916800,
39+
"endTime": 1500667800
40+
}' \
41+
--max-time 60
42+
43+
# Test GeoPressure v2/timeseries endpoint using pressure timeseries
44+
- name: Test v2/timeseries with pressure values
45+
run: |
46+
curl -X POST "https://glp.mgravey.com/GeoPressure/v2/timeseries/" \
47+
-H "Content-Type: application/json" \
48+
-d '{
49+
"lon": 6,
50+
"lat": 46,
51+
"time": [1572075000, 1572076800, 1572078600],
52+
"pressure": [97766, 97800, 97833]
53+
}' \
54+
--max-time 60
55+
56+
# Test GeoPressure v2/pressurepath endpoint using pressure timeseries
57+
- name: Test v2/pressurepath
58+
run: |
59+
curl -X POST "https://glp.mgravey.com/GeoPressure/v2/pressurepath/" \
60+
-H "Content-Type: application/json" \
61+
-d '{
62+
"lon": [17.5, 17.5, 17.5, 17.5, 17.5, 41.6, 41.6],
63+
"lat": [48.5, 48.5, 48.5, 48.5, 48.5, 41.6, 41.6],
64+
"time": [1501113600, 1501115400, 1501117200, 1501119000, 1501120800, 1501745400, 1501747200],
65+
"variable": ["altitude", "surface_pressure"],
66+
"dataset": "land",
67+
"pressure": [98900, 99200, 99400, 99500, 99900, 100000, 100100],
68+
"workers": 1
69+
}' \
70+
--max-time 60

0 commit comments

Comments
 (0)