11name : stac-fastapi
22on :
33 push :
4- branches : [ master ]
4+ branches : [master]
55 pull_request :
6- branches : [ master ]
6+ branches : [master]
77
88jobs :
99 test :
1010 runs-on : ubuntu-latest
1111 strategy :
1212 matrix :
13- python-version : [ ' 3.8', ' 3.9', ' 3.10' ]
13+ python-version : [" 3.8", " 3.9", " 3.10" ]
1414 timeout-minutes : 10
1515
1616 services :
@@ -118,9 +118,56 @@ jobs:
118118 POSTGRES_HOST_READER : localhost
119119 POSTGRES_HOST_WRITER : localhost
120120 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+
121168 test-docs :
122169 runs-on : ubuntu-latest
123170 steps :
124171 - uses : actions/checkout@v3
125172 - name : Test generating docs
126- run : make docs
173+ run : make docs
0 commit comments