open-payments 0.1.2

Open Payments Rust SDK library with types, HTTP client and signature utilities
Documentation
name: CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - name: Install Rust stable
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        override: true
        profile: minimal

    - name: Cache dependencies
      uses: actions/cache@v3
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          target
        key: ${{ runner.os }}-cargo-stable-${{ hashFiles('**/Cargo.lock') }}

    - name: Check formatting
      run: cargo fmt --all -- --check

    - name: Check clippy
      run: cargo clippy --all-targets --all-features -- -D warnings

    - name: Run tests
      run: cargo test --all-features -- --skip integration

    - name: Run doc tests
      run: cargo test --doc

    - name: Build with snippets feature
      run: cargo build --release --features snippets

  docs:
    name: Build documentation
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4

    - name: Install Rust stable
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        override: true
        profile: minimal

    - name: Build docs
      run: cargo doc --no-deps --features snippets