Skip to content

Merge pull request #104 from cita-cloud/feat-amend #283

Merge pull request #104 from cita-cloud/feat-amend

Merge pull request #104 from cita-cloud/feat-amend #283

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
- main
paths-ignore:
- 'book/**'
- README.md
- README-CN.md
- LICENSE
- Dockerfile
- .gitignore
- .dockerignore
workflow_dispatch:
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
PROTOC_NO_VENDOR: 1
jobs:
rustfmt:
name: rustfmt
runs-on: [self-hosted, Linux, alibaba-cloud]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Check formating
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: clippy
runs-on: [self-hosted, Linux, alibaba-cloud]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: clippy
- name: Use cache
uses: Swatinem/rust-cache@v1
- name: Check clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets
test:
name: test
runs-on: [self-hosted, Linux, alibaba-cloud]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Use cache
uses: Swatinem/rust-cache@v1
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets
build:
name: build
runs-on: [self-hosted, Linux, alibaba-cloud]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Use cache
uses: Swatinem/rust-cache@v1
- name: Run build
uses: actions-rs/cargo@v1
with:
command: build
args: --all-targets