2019-09-26 17:34:31 +02:00
|
|
|
|
|
|
|
stages:
|
2019-10-14 02:17:25 +02:00
|
|
|
- test
|
2019-10-20 17:42:58 +02:00
|
|
|
- publish
|
2019-09-26 17:34:31 +02:00
|
|
|
|
2019-10-14 01:15:12 +02:00
|
|
|
variables:
|
|
|
|
CARGO_HOME: $CI_PROJECT_DIR/cargo
|
|
|
|
|
2020-01-20 23:51:27 +01:00
|
|
|
test-default:
|
2019-10-14 02:17:25 +02:00
|
|
|
stage: test
|
2019-10-14 01:15:12 +02:00
|
|
|
image: msrd0/rust:alpine
|
|
|
|
before_script:
|
|
|
|
- cargo -V
|
2019-09-26 17:34:31 +02:00
|
|
|
script:
|
2020-05-05 19:57:13 +02:00
|
|
|
- cargo test --workspace --tests -- --ignored
|
2019-10-14 01:15:12 +02:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- cargo/
|
|
|
|
- target/
|
2019-10-14 00:59:02 +02:00
|
|
|
|
2019-10-14 02:17:25 +02:00
|
|
|
test-all:
|
|
|
|
stage: test
|
|
|
|
image: msrd0/rust:alpine-tarpaulin
|
2019-10-14 01:15:12 +02:00
|
|
|
before_script:
|
2020-05-04 21:34:20 +02:00
|
|
|
- apk add --no-cache postgresql-dev
|
2019-10-14 01:15:12 +02:00
|
|
|
- cargo -V
|
2019-10-14 00:59:02 +02:00
|
|
|
script:
|
2020-01-25 14:11:57 +01:00
|
|
|
- cargo test --workspace --all-features --doc
|
2020-05-05 19:57:13 +02:00
|
|
|
- cargo test trybuild_ui -- --ignored
|
2020-05-03 18:21:50 +02:00
|
|
|
- cargo tarpaulin --target-dir target/tarpaulin --all --all-features --exclude-files 'cargo/*' --exclude-files 'gotham_restful_derive/*' --exclude-files 'example/*' --ignore-panics --ignore-tests --out Html -v
|
2020-04-12 22:30:17 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- tarpaulin-report.html
|
2019-10-14 01:15:12 +02:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- cargo/
|
|
|
|
- target/
|
2019-10-14 00:59:02 +02:00
|
|
|
|
|
|
|
readme:
|
2019-10-14 02:17:25 +02:00
|
|
|
stage: test
|
2020-02-11 18:56:47 +01:00
|
|
|
image: msrd0/cargo-readme
|
2019-10-14 00:59:02 +02:00
|
|
|
script:
|
|
|
|
- cargo readme -r gotham_restful -t ../README.tpl >README.md.new
|
|
|
|
- diff README.md README.md.new
|
2019-10-20 17:42:33 +02:00
|
|
|
|
|
|
|
publish:
|
|
|
|
stage: publish
|
|
|
|
image: msrd0/rust:alpine
|
|
|
|
before_script:
|
|
|
|
- cargo -V
|
|
|
|
- cargo login $CRATES_IO_TOKEN
|
|
|
|
script:
|
|
|
|
- cd gotham_restful_derive
|
|
|
|
- cargo publish
|
2020-01-20 23:51:27 +01:00
|
|
|
- sleep 10s
|
2019-10-20 17:42:33 +02:00
|
|
|
- cd ../gotham_restful
|
|
|
|
- cargo publish
|
|
|
|
- cd ..
|
|
|
|
only:
|
|
|
|
- tags
|