From 39954289a009cc26d315f910af728eb47308838d Mon Sep 17 00:00:00 2001 From: evenyag Date: Wed, 20 Apr 2022 10:43:41 +0800 Subject: [PATCH] ci: Setup ci --- .github/workflows/develop.yml | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/develop.yml diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 0000000000..032bfb9fd6 --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,69 @@ +on: [push, pull_request] + +name: Continuous integration for developing + +env: + RUST_TOOLCHAIN: nightly-2022-04-03 + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ env.RUST_TOOLCHAIN }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + args: --workspace --all-targets + + test: + name: Test Suite + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ env.RUST_TOOLCHAIN }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ env.RUST_TOOLCHAIN }} + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ env.RUST_TOOLCHAIN }} + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: --workspace --all-targets -- -D warnings