-
Notifications
You must be signed in to change notification settings - Fork 88
/
.travis.yml
51 lines (41 loc) · 1.85 KB
/
.travis.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
language: rust
rust:
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
cache:
directories:
- stripe-mock
env:
global:
# N.B. Whenever this is updated, please update `tests/common.rs` as well
- STRIPE_MOCK_VERSION=0.90.0
before_install:
# Unpack and start stripe-mock so that the test suite can talk to it
- |
if [ ! -d "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}" ]; then
mkdir -p stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/
curl -L "https://github.com/stripe/stripe-mock/releases/download/v${STRIPE_MOCK_VERSION}/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -o "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz"
tar -zxf "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}_linux_amd64.tar.gz" -C "stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/"
fi
# - |
# stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}/stripe-mock -strict-version-check > /dev/null &
# STRIPE_MOCK_PID=$!
# - export PATH="${PATH}:${PWD}/stripe-mock/stripe-mock_${STRIPE_MOCK_VERSION}"
script:
- rustup component add rustfmt
- cargo fmt -- --check
# Check "no default features"
- cargo build --verbose --workspace --exclude binary_size --no-default-features --features default-tls
# Check "full/blocking"
- cargo build --verbose --workspace --exclude binary_size
- cargo test --verbose --workspace --exclude binary_size
# Check "full/async
- cargo build --verbose --features async --workspace --exclude binary_size
- cargo test --verbose --features async --example async_create_charge
# Check "rustls-tls"
- cargo build --verbose --no-default-features --features "full webhook-events blocking rustls-tls" --workspace --exclude binary_size
- cargo test --verbose --no-default-features --features "full webhook-events blocking rustls-tls" --workspace --exclude binary_size