FastAPI implementation #51
This file contains 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: Docker Image CI | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Build the JRG Docker image | |
run: docker build ./ --file docker/Dockerfile --tag jrg:${{github.sha}} | |
- name: Test JRG Docker image | |
run: | | |
docker run --rm -t -v "${PWD}/tests:/data" -v pgdata:/pgdata -e POSTGRES_PASSWORD=password jrg:${{github.sha}} /init.sh /data/unit_data.osm | |
docker run --rm -v pgdata:/pgdata -d -p 8080:80 jrg:${{github.sha}} | |
for i in `seq 1 20`; do sleep 1; echo "."; if curl --output /dev/null --silent --head localhost:8080; then break; fi done | |
curl -s 'http://localhost:8080/reverse?lon=-73.96665&lat=40.71181' | grep house_number |