image: rust
test:
stage: test
before_script:
- mkdir -p .cargo_cache
# Only stuff inside the repo directory can be cached
# Override the CARGO_HOME variable to force it location
- export CARGO_HOME="${PWD}/.cargo_cache"
script:
- cargo test
cache:
paths:
- .cargo_cache
pages:
stage: deploy
only:
- master
script:
- cargo doc --no-deps
- rm -rf public
- mv target/doc/ public
artifacts:
paths:
- public