downsample 0.0.5

keep downsampled history of data over long period of time
Documentation
variables:
  GIT_STRATEGY: fetch
  GIT_DEPTH: 3
  GIT_CLEAN_FLAGS: -f
  CACHE_IMAGE_TAG: latest

stages:
  - check-compile
  - post

before_script:
  - source $HOME/.cargo/env
  - df -h /
  - free -h
  - cargo --version
  - export DISABLE_GIT_LFS_CHECK=true
  - export RUSTFLAGS="-D warnings"
  - rm -r target || echo "target doesnt exist, which is fine"

# -- check

code-quality:
  image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
  stage: check-compile
  tags: ["check"]
  script:
    - cargo clippy --all-targets -- -D warnings
    - cargo fmt --all -- --check

security:
  image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
  stage: check-compile
  allow_failure: true
  tags: ["check"]
  script:
    - cargo audit

# -- post build

unittests:
  image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
  stage: post
  tags: ["check"]
  script:
    - cargo test

coverage:
  image: registry.gitlab.com/veloren/veloren-docker-ci/cache/tarpaulin:${CACHE_IMAGE_TAG}
  stage: post
  tags: ["check"]
  coverage: '/^\d+.\d+% coverage/'
  script:
    - cargo tarpaulin -v
#benchmarks:
#    image: registry.gitlab.com/veloren/veloren-docker-ci/cache/bench:${CACHE_IMAGE_TAG}
#    stage: post
#    tags:
#        - veloren-docker
#    script:
#        - cargo bench -- --nocapture