Try setup CI a bit more

This commit is contained in:
Julius 2020-02-29 22:56:14 +01:00
parent ccd7cd60ca
commit 71bb49fcec

View file

@ -3,12 +3,34 @@
# https://hub.docker.com/r/library/rust/tags/ # https://hub.docker.com/r/library/rust/tags/
image: "rust:latest" image: "rust:latest"
stages:
- test
- build
# Use cargo to test the project # Use cargo to test the project
test:cargo: test:
stage: test
script: script:
- rustc --version && cargo --version # Print version info for debugging
- cargo test --all --verbose - cargo test --all --verbose
cache: cache:
key: cargo_cache
paths: paths:
- target/ - target/
build:
stage: build
only:
- master
- tags
script:
- cargo build --release
cache:
key: cargo_cache
paths:
- target/
artifacts:
expire_in: 30 days
paths:
- target/release/summer
- target/release/summer.*