hashicorp_vault 2.1.1

HashiCorp Vault API client for Rust
Documentation
name: ci
on:
  workflow_dispatch:
  pull_request:
  push:
    branches:
    - master
jobs:
  test:
    name: test
    runs-on: ubuntu-22.04
    strategy:
      matrix:
        vault_version:
          - 1.0.0
          - 1.1.5
          - 1.2.7
          - 1.3.10
          - 1.4.7
          - 1.5.7
          - 1.6.7
          - 1.8.12
          - 1.12.0
        # The docs seem to suggest that we can have a matrix with just an
        # include directive, but it results in a "matrix must define at least
        # one vector" error in the CI system.
        build: [stable]
        include:
        - build: pinned
          os: ubuntu-18.04
          rust: 1.56.0
          vault_version: '1.6.2'
        - build: stable
          os: ubuntu-18.04
          rust: stable
        - build: beta
          os: ubuntu-18.04
          rust: beta
          vault_version: '1.6.2'
        - build: nightly
          os: ubuntu-18.04
          rust: nightly
          vault_version: '1.6.2'
    steps:
    - name: Checkout repository
      uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - name: Install Rust
      uses: actions-rs/toolchain@v1
      with:
        toolchain: ${{ matrix.rust }}
        override: true
        profile: minimal
    - name: Setup vault
      run: bin/install-vault-release.sh
      env:
        VAULT_VERSION: ${{ matrix.vault_versions }}
    - name: Start vault
      run: $HOME/bin/vault server -dev -dev-root-token-id=test-root-123 > /dev/null 2>&1 &
    - name: Setup local vault token file
      run: echo 'test-root-123' > $HOME/.vault-token
    - run: cargo doc --verbose
    - run: cargo build --verbose
    - name: Create Vault token
      run: $HOME/bin/vault token create -id="test12345" -ttl="720h"
      env:
        VAULT_ADDR: http://127.0.0.1:8200
    - name: Enable Vault Transit
      run: $HOME/bin/vault secrets enable transit
      env:
        VAULT_ADDR: http://127.0.0.1:8200
    - name: Write test Vault key
      run: $HOME/bin/vault write -f transit/keys/test-vault-rs
      env:
        VAULT_ADDR: http://127.0.0.1:8200
    - run: cargo test --verbose

  rustfmt:
    name: rustfmt
    runs-on: ubuntu-18.04
    steps:
    - name: Checkout repository
      uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - name: Install Rust
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        override: true
        profile: minimal
        components: rustfmt
    - name: Check formatting
      run: |
        cargo fmt -- --check