1
1
name : stac-fastapi
2
2
on :
3
3
push :
4
- branches : [ master ]
4
+ branches : [master]
5
5
pull_request :
6
- branches : [ master ]
6
+ branches : [master]
7
7
8
8
jobs :
9
9
test :
10
10
runs-on : ubuntu-latest
11
11
strategy :
12
12
matrix :
13
- python-version : [ ' 3.8', ' 3.9', ' 3.10' ]
13
+ python-version : [" 3.8", " 3.9", " 3.10" ]
14
14
timeout-minutes : 10
15
15
16
16
services :
@@ -118,9 +118,56 @@ jobs:
118
118
POSTGRES_HOST_READER : localhost
119
119
POSTGRES_HOST_WRITER : localhost
120
120
POSTGRES_PORT : 5432
121
+
122
+ validate :
123
+ runs-on : ubuntu-latest
124
+ services :
125
+ pgstac :
126
+ image : ghcr.io/stac-utils/pgstac:v0.6.11
127
+ env :
128
+ POSTGRES_USER : username
129
+ POSTGRES_PASSWORD : password
130
+ POSTGRES_DB : postgis
131
+ PGUSER : username
132
+ PGPASSWORD : password
133
+ PGDATABASE : postgis
134
+ options : >-
135
+ --health-cmd pg_isready
136
+ --health-interval 10s
137
+ --health-timeout 5s
138
+ --health-retries 5
139
+ ports :
140
+ - 5432:5432
141
+ steps :
142
+ - name : Check out repository code
143
+ uses : actions/checkout@v3
144
+ - name : Setup Python
145
+ uses : actions/setup-python@v3
146
+ with :
147
+ python-version : " 3.10"
148
+ cache : pip
149
+ cache-dependency-path : stac_fastapi/pgstac/setup.cfg
150
+ - name : Install stac-fastapi and stac-api-validator
151
+ run : pip install ./stac_fastapi/pgstac[server] stac-api-validator
152
+ - name : Load data and validate
153
+ run : python -m stac_fastapi.pgstac.app & ./scripts/wait-for-it.sh localhost:8080 && python ./scripts/ingest_joplin.py http://localhost:8080 && stac-api-validator --root-url http://localhost:8080 --conformance core
154
+ env :
155
+ POSTGRES_USER : username
156
+ POSTGRES_PASS : password
157
+ POSTGRES_DBNAME : postgis
158
+ POSTGRES_HOST_READER : localhost
159
+ POSTGRES_HOST_WRITER : localhost
160
+ POSTGRES_PORT : 5432
161
+ PGUSER : username
162
+ PGPASSWORD : password
163
+ PGHOST : localhost
164
+ PGDATABASE : postgis
165
+ APP_HOST : 0.0.0.0
166
+ APP_PORT : 8080
167
+
121
168
test-docs :
122
169
runs-on : ubuntu-latest
123
170
steps :
124
171
- uses : actions/checkout@v3
125
172
- name : Test generating docs
126
- run : make docs
173
+ run : make docs
0 commit comments