1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-04-19 22:44:38 +00:00

ci: use cargo sweep instead of cargo clean

This commit is contained in:
Dominic 2020-05-09 03:27:58 +02:00
parent e2eb9b0fcc
commit 9ed24c9bcb
Signed by: msrd0
GPG key ID: DCC8C247452E98F9

View file

@ -9,35 +9,39 @@ variables:
test-default: test-default:
stage: test stage: test
image: msrd0/rust:alpine image: msrd0/rust:alpine-sweep
before_script: before_script:
- cargo -V - cargo -V
- cargo sweep -s
script: script:
- cargo test --workspace --tests - cargo test --workspace --tests
- cargo test --workspace --tests -- --ignored - cargo test --workspace --tests -- --ignored
after_script: after_script:
- cargo clean - cargo sweep -f
cache: cache:
key: cargo-default
paths: paths:
- cargo/ - cargo/
- target/ - target/
test-all: test-all:
stage: test stage: test
image: msrd0/rust:alpine-tarpaulin image: msrd0/rust:alpine-tarpaulin-sweep
before_script: before_script:
- apk add --no-cache postgresql-dev - apk add --no-cache postgresql-dev
- cargo -V - cargo -V
- cargo sweep -s
script: script:
- cargo test --workspace --all-features --doc - cargo test --workspace --all-features --doc
- cargo test --workspace --tests -- --ignored - cargo test --workspace --tests -- --ignored
- 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 - 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: after_script:
- cargo clean - cargo sweep -f
artifacts: artifacts:
paths: paths:
- tarpaulin-report.html - tarpaulin-report.html
cache: cache:
key: cargo-all
paths: paths:
- cargo/ - cargo/
- target/ - target/
@ -51,18 +55,20 @@ readme:
doc: doc:
stage: build stage: build
image: msrd0/rust:alpine image: msrd0/rust:alpine-sweep
before_script: before_script:
- cargo -V - cargo -V
- cargo sweep -s
script: script:
- cargo doc --all-features - 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 - 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: after_script:
- cargo clean - cargo sweep -f
artifacts: artifacts:
paths: paths:
- target/doc/ - target/doc/
cache: cache:
key: cargo-doc
paths: paths:
- cargo/ - cargo/
- target/ - target/