1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-02-23 04:52:28 +00:00
deprecated-gotham-restful/.gitlab-ci.yml

106 lines
2.2 KiB
YAML
Raw Normal View History

2019-09-26 17:34:31 +02:00
stages:
2019-10-14 02:17:25 +02:00
- test
2020-05-06 15:58:11 +02:00
- build
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
image: msrd0/rust:alpine-sweep
2019-10-14 01:15:12 +02:00
before_script:
- cargo -V
- cargo sweep -s
2019-09-26 17:34:31 +02:00
script:
2020-05-16 01:03:17 +02:00
- cargo test --workspace --doc
2020-05-06 17:15:51 +02:00
- cargo test --workspace --tests
2020-05-05 19:57:13 +02:00
- cargo test --workspace --tests -- --ignored
after_script:
- cargo sweep -f
2019-10-14 01:15:12 +02:00
cache:
key: cargo-default
2019-10-14 01:15:12 +02:00
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-sweep
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
- cargo sweep -s
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-06 17:15:51 +02:00
- cargo test --workspace --tests -- --ignored
2020-05-05 23:18:05 +02:00
- cargo tarpaulin --target-dir target/tarpaulin --all --all-features --exclude-files 'cargo/*' --exclude-files 'derive/*' --exclude-files 'example/*' --ignore-panics --ignore-tests --out Html -v
after_script:
- cargo sweep -f
2020-04-12 22:30:17 +02:00
artifacts:
paths:
- tarpaulin-report.html
2019-10-14 01:15:12 +02:00
cache:
key: cargo-all
2019-10-14 01:15:12 +02:00
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:
2020-05-05 23:18:05 +02:00
- cargo readme -t README.tpl >README.md.new
2019-10-14 00:59:02 +02:00
- diff README.md README.md.new
2019-10-20 17:42:33 +02:00
2020-05-06 15:58:11 +02:00
doc:
stage: build
image: msrd0/rust:alpine-sweep
2020-05-06 15:58:11 +02:00
before_script:
- cargo -V
- cargo sweep -s
2020-05-06 15:58:11 +02:00
script:
- cargo doc --all-features
- echo '<!DOCTYPE HTML><html><head><meta http-equiv="Refresh" content="0; url=./gotham_restful/index.html"/></head><body>The documentation is located <a href="./gotham_restful/index.html">here</a></body></html>' >target/doc/index.html
after_script:
- cargo sweep -f
2020-05-06 15:58:11 +02:00
artifacts:
paths:
- target/doc/
cache:
key: cargo-doc
2020-05-06 15:58:11 +02:00
paths:
- cargo/
- target/
only:
- master
pages:
stage: publish
image: busybox
script:
- mv target/doc public
- mv tarpaulin-report.html public/coverage.html
artifacts:
paths:
- public
only:
- master
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
- sleep 1m
2019-10-20 17:42:33 +02:00
- cd ../gotham_restful
- cargo publish
- cd ..
only:
- tags