Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
* update actions version
* add code coverage check
  • Loading branch information
ririsoft committed Jun 15, 2024
1 parent c5fea26 commit 0e5294c
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ jobs:
steps:

- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
components: rustfmt, clippy, llvm-tools-preview

- name: Run cargo fmt
uses: actions-rs/cargo@v1
- name: Setup rust smart caching
uses: Swatinem/rust-cache@v2
with:
command: fmt
args: --all -- --check
cache-on-failure: "true"

- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
run: cargo clippy --no-deps -- -D warnings

- name: Run cargo build
uses: actions-rs/cargo@v1
with:
command: build

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
run: cargo build

- name: Cargo tests
run: cargo test

- name: Setup cargo-llvm-cov
run: cargo install cargo-llvm-cov

- name: Run code coverage test
run: |
cargo llvm-cov test --fail-under-lines 90

0 comments on commit 0e5294c

Please sign in to comment.