language: rust
services:
- docker
jobs:
fast_finish: true
include:
- name: Check simple example
rust: stable
script:
- cd examples/simple
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- cargo fmt -- --check
- cargo check
- name: Check tls example
rust: stable
script:
- cd examples/tls
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- cargo fmt -- --check
- cargo check
- name: Dgraph 1.0 tests
rust: stable
before_install:
- docker-compose -f docker-compose-1-0.yaml up -d
- docker ps
script:
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- cargo fmt -- --check
- cargo test --no-default-features --features dgraph-1-0 --features sync --verbose -- --test-threads=1
- name: Dgraph 1.1 tests
rust: stable
before_install:
- docker-compose -f docker-compose-1-1.yaml up -d
- docker ps
script:
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- cargo fmt -- --check
- cargo test --features sync --verbose -- --test-threads=1
- name: Dgraph 1.2 tests
rust: stable
before_install:
- docker-compose -f docker-compose-1-2.yaml up -d
- docker ps
script:
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- cargo fmt -- --check
- cargo test --features sync --verbose -- --test-threads=1
- name: Dgraph 20.03 tests
rust: stable
before_install:
- docker-compose -f docker-compose-20-03.yaml up -d
- docker ps
script:
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- cargo fmt -- --check
- cargo test --features sync --verbose -- --test-threads=1
- name: Dgraph 20.03 ACL tests
rust: stable
before_install:
- docker-compose -f docker-compose-20-03-acl.yaml up -d
- docker ps
script:
- rustup component add rustfmt --toolchain stable-x86_64-unknown-linux-gnu
- cargo fmt -- --check
- cargo test --features acl --features sync --verbose -- --test-threads=1