prom-remote-api 0.3.0

Prometheus remote storage API for Rust
Documentation
# Copyright 2022 CeresDB Project Authors. Licensed under Apache-2.0.

name: CI

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

# Common environment variables
env:
  RUSTFLAGS: "-C debuginfo=1"
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: "1"

jobs:
  CI:
    name: CI
    runs-on: ubuntu-latest
    timeout-minutes: 20
    strategy:
      matrix:
        rust: [stable]
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true
      - run: |
          rustup set auto-self-update disable
          rustup toolchain install ${{ matrix.rust }} --profile minimal
      - name: Cache Rust Dependencies
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo
            ./target
          key: debug-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}
          restore-keys: |
            debug-${{ runner.os }}-
            debug-
      - name: Install deps
        run: |
          make setup
          cargo install cargo-sort
      - name: Run Style Check
        run: |
          make clippy
          make fmt
          make cargo-sort
      - name: Run Unit Tests
        run: |
          make test