mirror of
https://github.com/maplibre/martin.git
synced 2024-12-24 07:22:52 +03:00
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
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
|
|
|
|
- run:
|
|
name: Run build
|
|
command: cargo build --release
|
|
|
|
- run:
|
|
name: Run server
|
|
command: ./target/release/martin postgres://postgres@localhost/test
|
|
background: true
|
|
|
|
- run:
|
|
name: Check tiles
|
|
command: |
|
|
wget https://github.com/urbica/martin/releases/download/v0.1.0/vtzero-check
|
|
chmod +x vtzero-check
|
|
wget https://github.com/urbica/martin/releases/download/v0.1.0/vtzero-show
|
|
chmod +x vtzero-show
|
|
dockerize -wait tcp://localhost:3000 -timeout 1m
|
|
curl localhost:3000/public.table_source/0/0/0.pbf > table_source.pbf
|
|
./vtzero-check table_source.pbf
|
|
./vtzero-show table_source.pbf
|
|
curl localhost:3000/rpc/public.function_source/0/0/0.pbf > function_source.pbf
|
|
./vtzero-check function_source.pbf
|
|
./vtzero-show function_source.pbf
|