engula 0.2.0

A serverless storage engine that empowers engineers to build reliable and cost-effective databases.
Documentation
# Copyright 2021 The Engula Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check Code

on:
  push:
    paths-ignore:
      - 'docs/'
      - '*.md'
  pull_request:
    paths-ignore:
      - 'docs/'
      - '*.md'

concurrency:
  group: ${{ github.ref }}-${{ github.workflow }}
  cancel-in-progress: true

jobs:
  test:
    name: Run tests

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        rust: [nightly]

    runs-on: ${{ matrix.os }}

    steps:
    - name: Checkout Repository
      uses: actions/checkout@v2

    - name: Install Rust toolchain
      uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: ${{ matrix.rust }}
        components: rustfmt
        override: true

    - name: Load cargo cache
      id: cache
      uses: ./.github/actions/cargo-cache

    - name: Cargo build
      uses: actions-rs/cargo@v1
      with:
        command: build

    - name: Cargo test
      uses: actions-rs/cargo@v1
      with:
        command: test
        args: --workspace

  check:
    name: Check style
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Install Rust toolchain
      uses: actions-rs/toolchain@v1
      with:
        profile: minimal
        toolchain: nightly
        components: clippy, rustfmt
        override: true

    - name: Load cargo cache
      id: cache
      uses: ./.github/actions/cargo-cache

    - name: Check clippy
      uses: actions-rs/cargo@v1
      with:
        command: clippy
        args: --workspace --tests --all-features -- -D warnings

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

  tidy:
    name: Check tidy
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

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

    - name: Load cargo cache
      id: cache
      uses: ./.github/actions/cargo-cache

    - name: Cargo build
      uses: actions-rs/cargo@v1
      with:
        command: build

    - name: Verify tidy
      run: git diff --exit-code