lnd_rest 0.3.0

Rust wrapper to interact with the REST API of a Lightning Network Daemon node.
Documentation
name: "Rust CI"

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  fmt:
    name: "Cargo format"
    runs-on: "ubuntu-latest"
    steps:
      - name: "Checkout repository"
        uses: "actions/checkout@v3"

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

      - name: "Install cargo fmt"
        run: "rustup component add rustfmt"

      - name: "Run cargo fmt"
        uses: "actions-rs/cargo@v1"
        with:
          command: "fmt"
          args: "--all -- --check"

  clippy:
    name: "Cargo clippy"
    needs: [fmt]
    runs-on: "ubuntu-latest"
    steps:
      - name: "Checkout repository"
        uses: "actions/checkout@v3"

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

      - name: "Install cargo clippy"
        run: "rustup component add clippy"

      - name: "Run cargo clippy"
        uses: "actions-rs/cargo@v1"
        with:
          command: "clippy"
          args: "-- -D warnings"

  build:
    name: "Cargo build"
    needs: [clippy]
    runs-on: "ubuntu-latest"

    steps:
      - name: "Checkout repository"
        uses: "actions/checkout@v3"

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

      - name: "Run cargo build"
        uses: "actions-rs/cargo@v1"
        with:
          command: "build"
          args: "--all --release"