Skip to content

Commit

Permalink
Merge pull request #257 from drmingdrmer/refine-ci
Browse files Browse the repository at this point in the history
CI: move example-test and lint out of unit-test
  • Loading branch information
drmingdrmer authored Mar 31, 2022
2 parents fda6c47 + cd32545 commit 41f2463
Showing 1 changed file with 53 additions and 29 deletions.
82 changes: 53 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,34 @@ 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:
command: build
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()
with:
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
Expand All @@ -82,7 +75,6 @@ jobs:
with:
toolchain: "stable"
override: true
components: rustfmt, clippy

- name: Unit Tests
uses: actions-rs/cargo@v1
Expand All @@ -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:
Expand All @@ -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

0 comments on commit 41f2463

Please # to comment.