diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 50b68e57b..1172ac417 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,13 +34,6 @@ jobs: RAFT_STORE_DEFENSIVE: ${{ matrix.store_defensive }} - - name: Test example-raft-kv - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path example-raft-kv/Cargo.toml - - - name: Build | Release Mode uses: actions-rs/cargo@v1 with: @@ -48,20 +41,6 @@ jobs: args: --release --all-features - - name: Format - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - - - name: Clippy - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-targets -- -D warnings -A clippy::bool-assert-comparison - - - name: Upload artifact uses: actions/upload-artifact@v2 if: failure() @@ -69,6 +48,20 @@ jobs: path: | openraft/_log/ + test-example: + name: test example + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1.0.6 + + - name: Test example-raft-kv + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path example-raft-kv/Cargo.toml + + ut-on-stable-rust: name: unittest on stable rust runs-on: ubuntu-latest @@ -82,7 +75,6 @@ jobs: with: toolchain: "stable" override: true - components: rustfmt, clippy - name: Unit Tests uses: actions-rs/cargo@v1 @@ -95,13 +87,6 @@ jobs: RUST_BACKTRACE: full - - name: Test example-raft-kv - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path example-raft-kv/Cargo.toml - - - name: Build | Release Mode | No features uses: actions-rs/cargo@v1 with: @@ -125,3 +110,42 @@ jobs: with: path: | openraft/_log/ + + test-example-on-stable-rust: + name: test example on stable rust + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: "stable" + override: true + + - name: Test example-raft-kv + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path example-raft-kv/Cargo.toml + + lint: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1.0.6 + with: + components: rustfmt, clippy + + - name: Format + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + + - name: Clippy + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-targets -- -D warnings -A clippy::bool-assert-comparison