yup-oauth2 3.0.2-beta

An oauth2 implementation, providing the 'device', 'service account' and 'installed' authorization flows
Documentation
os:
  - linux
  - osx
dist: xenial
sudo: false
addons:
  apt:
    packages:
      # necessary for kcov
      - libcurl4-openssl-dev
      - libelf-dev
      - libdw-dev
      - libiberty-dev
      - binutils-dev
      - cmake
      - gcc

language: rust
rust:
  - stable
  - nightly

stages:
  - name: test
  - name: lint
  - name: coverage

install: true

# Default script is the "test" stage
script: 
  - cargo build
  - cargo test

jobs:
  include:
    - stage: lint
      if: os = linux
      rust: stable
      install:
        - rustup component add clippy
        - rustup component add rustfmt
      script:
        - cargo fmt --all -- --check
        - cargo clippy --all-targets --all-features -- -D warnings || true

    - stage: coverage
      if: os = linux
      sudo: true
      rust: stable
      env:
        - RUSTFLAGS="-C link-dead-code -C debuginfo=2 -C opt-level=0"
        - CACHE_NAME="coverage"
      install:
        - ./.travis/install-kcov.sh "v36" "29ccdde3bd44f14e0d7c88d709e1e5ff9b448e735538ae45ee08b73c19a2ea0b" && export PATH="kcov/usr/bin:${PATH}";
      script:
        - cargo test --no-run
        - ./.travis/run-kcov.sh "yup_oauth2"
        - bash <(curl -s https://codecov.io/bash) -F "${TRAVIS_RUST_VERSION}"

cache: cargo