machine:
  services:
    - riak

machine:
  post:
    - sudo sed -i 's/storage_backend.*/storage_backend = leveldb/' /etc/riak/riak.conf
    - sudo service riak restart
    - sudo riak version
    - sudo riak-admin bucket-type create maps '{"props":{"datatype":"map","backend":"leveldb"}}'
    - sudo riak-admin bucket-type activate maps
    - sudo riak-admin bucket-type create tests '{"props":{"backend":"leveldb"}}'
    - sudo riak-admin bucket-type activate tests
    - sudo riak-admin bucket-type create hlls '{"props":{"datatype":"hll","backend":"leveldb"}}'
    - sudo riak-admin bucket-type activate hlls


test:
  override:
    - go test -v -race -coverprofile=coverage.txt -covermode=atomic
  post:
    - bash <(curl -s https://codecov.io/bash)
machine:
  services:
    - riak

machine:
  post:
    - curl -s https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | sudo bash
    - sudo apt-get install riak=2.2.0-1 
    - sudo sed -i 's/storage_backend.*/storage_backend = leveldb/' /etc/riak/riak.conf
    - sudo service riak restart
    - sudo riak version
    - sudo riak-admin bucket-type create maps '{"props":{"datatype":"map","backend":"leveldb"}}'
    - sudo riak-admin bucket-type activate maps
    - sudo riak-admin bucket-type create tests '{"props":{"backend":"leveldb"}}'
    - sudo riak-admin bucket-type activate tests
    - sudo riak-admin bucket-type create hlls '{"props":{"datatype":"hll","backend":"leveldb"}}'
    - sudo riak-admin bucket-type activate hlls


test:
  override:
    - go test -v -race -coverprofile=coverage.txt -covermode=atomic
  post:
    - bash <(curl -s https://codecov.io/bash)
Install Riak KV 2.2.0 during setup
CircleCI: Install Riak KV 2.2.0 during setup
