version: 2 jobs: build: docker: - image: circleci/rust:1.29 environment: DATABASE_URL: postgres://postgres@localhost/test RUST_LOG: actix_web=debug,postgres=debug,martin=debug - image: mdillon/postgis:11-alpine environment: POSTGRES_USER: postgres POSTGRES_DB: test steps: - checkout - run: name: Wait for database command: dockerize -wait tcp://localhost:5432 -timeout 1m - run: name: Install dependencies command: sudo apt-get install postgresql-client - run: name: Prepare database command: | psql -h localhost -p 5432 -U postgres -d test -f tests/fixtures/TileBBox.sql psql -h localhost -p 5432 -U postgres -d test -f tests/fixtures/table_source.sql psql -h localhost -p 5432 -U postgres -d test -f tests/fixtures/function_source.sql psql -h localhost -p 5432 -U postgres -d test -c "select public.function_source(0, 0, 0, '{}'::json);" - run: name: Run tests command: cargo test --verbose --all