-
Notifications
You must be signed in to change notification settings - Fork 27
/
.gitlab-ci.yml
69 lines (59 loc) · 2.01 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
image: iceyec/ci-rust
before_script:
- export TRAVIS_JOB_ID=$CI_BUILD_ID
cache:
key: $CI_BUILD_STAGE/$CI_BUILD_REF_NAME
paths:
- $HOME/.cargo
variables:
TRAVIS_CARGO_NIGHTLY_FEATURE: ""
stages:
- test
- publish
test-stable-0.4.1:
script:
- VAULT_VERSION=0.4.1 bin/install-vault-release.sh
- $HOME/bin/vault server -dev &
- curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- -y --disable-sudo
- travis-cargo build
- VAULT_ADDR=http://127.0.0.1:8200 $HOME/bin/vault token-create -id="test12345"
- travis-cargo test
test-stable-0.5.0:
script:
- VAULT_VERSION=0.5.0 bin/install-vault-release.sh
- $HOME/bin/vault server -dev &
- curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- -y --disable-sudo
- travis-cargo build
- VAULT_ADDR=http://127.0.0.1:8200 $HOME/bin/vault token-create -id="test12345"
- travis-cargo test
- travis-cargo coverage --no-sudo || true
- cat target/kcov*/index.json || true
test-beta-0.5.0:
allow_failure: true
script:
- VAULT_VERSION=0.5.0 bin/install-vault-release.sh
- $HOME/bin/vault server -dev &
- curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- -y --disable-sudo --channel=beta
- travis-cargo build
- VAULT_ADDR=http://127.0.0.1:8200 $HOME/bin/vault token-create -id="test12345"
- travis-cargo test
test-nightly-0.5.0:
allow_failure: true
script:
- VAULT_VERSION=0.5.0 bin/install-vault-release.sh
- $HOME/bin/vault server -dev &
- curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- -y --disable-sudo --channel=nightly
- travis-cargo build
- VAULT_ADDR=http://127.0.0.1:8200 $HOME/bin/vault token-create -id="test12345"
- travis-cargo test
publish:
stage: publish
only:
- tags
script:
- curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- -y --disable-sudo
- cargo build --release --verbose
- cargo test --verbose
- cargo package --verbose
- cargo doc --verbose
- cargo publish --token "$CRATES_IO_TOKEN"