image: scorpil/rust:nightly

stages:
  - test

cargo:test:
  stage: test
  script:
    - ci/run-cargo-test.sh

rustfmt:
  stage: test
  before_script:
    - cargo install rustfmt
    - export PATH="/root/.cargo/bin:$PATH"
  script:
    - ci/run-rustfmt.sh

shellcheck:
  stage: test
  image: ubuntu:yakkety
  before_script:
    - apt-get update && apt-get install -y shellcheck
    - locale-gen en_US.UTF-8
    - export LANG=en_US.UTF-8
    - export LANGUAGE=en_US:en
    - export LC_ALL=en_US.UTF-8
  script:
    - ci/run-shellcheck.sh
