Try setup CI a bit more
This commit is contained in:
parent
ccd7cd60ca
commit
71bb49fcec
|
@ -3,12 +3,34 @@
|
|||
# https://hub.docker.com/r/library/rust/tags/
|
||||
image: "rust:latest"
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
# Use cargo to test the project
|
||||
test:cargo:
|
||||
# Use cargo to test the project
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- rustc --version && cargo --version # Print version info for debugging
|
||||
- cargo test --all --verbose
|
||||
cache:
|
||||
key: cargo_cache
|
||||
paths:
|
||||
- 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.*
|
||||
|
||||
|
|
Loading…
Reference in a new issue