Test GeoPressure API Server #3114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test GeoPressure API Server | |
| # This workflow runs every 12 hours and can also be triggered manually | |
| on: | |
| schedule: | |
| - cron: "0 */12 * * *" # Runs at minute 0 every 12th hour | |
| workflow_dispatch: | |
| jobs: | |
| run-api-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Test GeoPressure v2/map endpoint | |
| - name: Test v2/map endpoint | |
| 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 | |
| # Test GeoPressure v2/timeseries endpoint using startTime and endTime | |
| - name: Test v2/timeseries with startTime and endTime | |
| 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 | |
| # Test GeoPressure v2/timeseries endpoint using pressure timeseries | |
| - name: Test v2/timeseries with pressure values | |
| 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 | |
| # Test GeoPressure v2/pressurepath endpoint using pressure timeseries | |
| - name: Test v2/pressurepath | |
| run: | | |
| curl -X POST "https://glp.mgravey.com/GeoPressure/v2/pressurepath/" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{ | |
| "lon": [17.5, 17.5, 17.5, 17.5, 17.5, 41.6, 41.6], | |
| "lat": [48.5, 48.5, 48.5, 48.5, 48.5, 41.6, 41.6], | |
| "time": [1501113600, 1501115400, 1501117200, 1501119000, 1501120800, 1501745400, 1501747200], | |
| "variable": ["altitude", "surface_pressure"], | |
| "dataset": "land", | |
| "pressure": [98900, 99200, 99400, 99500, 99900, 100000, 100100], | |
| "workers": 1 | |
| }' \ | |
| --max-time 60 |