ccip-read-server 0.1.1

CCIP-READ Server Framework
Documentation
name: "CI"
on:
  pull_request:
  workflow_dispatch:

jobs:
  check:
    name: "Cargo check"
    runs-on: "ubuntu-latest"
    steps:
      - name: "Check out the repo"
        uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - uses: "actions-rs/toolchain@v1"
        with:
          profile: "minimal"
          toolchain: "stable"
          override: true
      - uses: "actions-rs/cargo@v1"
        with:
          command: "check"

  test:
    name: "Cargo test"
    runs-on: "ubuntu-latest"
    steps:
      - name: "Check out the repo"
        uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - uses: "actions-rs/toolchain@v1"
        with:
          profile: "minimal"
          toolchain: "stable"
          override: true
      - uses: "actions-rs/cargo@v1"
        with:
          command: "test"

  fmt:
    name: "Cargo format"
    runs-on: "ubuntu-latest"
    steps:
      - name: "Check out the repo"
        uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - uses: "actions-rs/toolchain@v1"
        with:
          profile: "minimal"
          toolchain: "stable"
          override: true
      - run: "rustup component add rustfmt"
      - uses: "actions-rs/cargo@v1"
        with:
          command: "fmt"
          args: "--all -- --check"

  clippy:
    name: "Cargo clippy"
    runs-on: "ubuntu-latest"
    steps:
      - name: "Check out the repo"
        uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - uses: "actions-rs/toolchain@v1"
        with:
          profile: "minimal"
          toolchain: "stable"
          override: true
      - run: "rustup component add clippy"
      - uses: "actions-rs/cargo@v1"
        with:
          command: "clippy"
          args: "-- -D warnings"