Skip to content
.gitlab-ci.yml 807 B
Newer Older
Administrator's avatar
Administrator committed
  - test
variables:
  GIT_DEPTH: "3"
  SIMPLECOV: "true"
  RUST_BACKTRACE: "1"
  RUSTFLAGS: ""
  CARGOFLAGS: ""
cache:
  key: "$CI_BUILD_NAME/$CI_BUILD_REF_NAME"
  untracked: true
test-linux:
Administrator's avatar
Administrator committed
  stage: test
  image: ethcore/rust:stable
  before_script:
    - git submodule update --init --recursive
  script:
    - export RUST_BACKTRACE=1
Administrator's avatar
Administrator committed
    - RS_FILES_MODIFIED=$(git --no-pager diff --name-only $CI_BUILD_REF_NAME $(git merge-base $CI_BUILD_REF_NAME master) | grep \.rs | wc -l)
    - JS_FILES_MODIFIED=$(git diff master | grep ^diff | grep -v a/js/ | wc -l)
    -  if [ -z $RS_FILES_MODIFIED ]; then ./test.sh $CARGOFLAGS --no-release; else ./js/scripts/install-deps.sh&./js/scripts/lint.sh&./js/scripts/test.sh&./js/scripts/build.sh&./js/scripts/release.sh; fi
  tags:
    - rust-test