ceresdb-client 1.0.2

Rust implementation of CeresDB client.
Documentation
# Copyright 2022 CeresDB Project Authors. Licensed under Apache-2.0.

name: CI

on:
  push:
    branches:
      - main
    paths-ignore:
      - 'etc/**'
      - '**.md'
  pull_request:
    branches:
      - main
    paths-ignore:
      - 'etc/**'
      - '**.md'

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-C debuginfo=1"

jobs:
  style-check:
    name: Libraries Style Check
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v3
      - name: Setup Build Environment
        run: |
          sudo apt update
          sudo apt install --yes cmake
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: rustfmt
      - name: Run
        run: |
          make fmt

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v3
      - name: Cache Rust dependencies
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo
            ./target
          key: ${{ runner.os }}-cache
      - name: Setup Build Environment
        run: |
          sudo apt update
          sudo apt install --yes gcc g++ libssl-dev pkg-config cmake
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
          components: clippy
      - name: Run Clippy
        run: |
          make clippy

  test:
    name: Test
    runs-on: ubuntu-latest
    timeout-minutes: 60
    steps:
      - uses: actions/checkout@v3
      - name: Cache Rust dependencies
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo
            ./target
          key: ${{ runner.os }}-cache
      - name: Setup Build Environment
        run: |
          sudo apt update
          sudo apt install --yes gcc g++ libssl-dev pkg-config cmake
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - name: Run Test
        run: |
          make test