blob: 89920cd8a72736cb8d47672f03e48693f5c24eec [file] [log] [blame]
# 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: style-check
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Build Environment
run: |
sudo apt update
sudo apt install --yes protobuf-compiler
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-08-28
override: true
components: clippy, rustfmt
- name: Install cargo binaries
run: |
cargo install cargo-sort
- name: Run Style Check
run: |
make clippy
make fmt
make check-cargo-toml
test:
name: test
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Build Environment
run: |
sudo apt update
sudo apt install --yes protobuf-compiler
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-08-28
override: true
- name: Run Test
run: |
make test