Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 14 additions & 22 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,28 @@ concurrency:
cancel-in-progress: true

jobs:
linter:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

name: Cargo fmt and clippy

steps:
- uses: actions/checkout@v4
- name: Check formatting
run: cargo fmt --all -- --check

tests:
name: Cargo fmt,clippy,build,test,tarpaulin
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]

name: Cargo test and tarpaulin
needs: linter

steps:
- uses: actions/checkout@v4

- name: Build
- name: Cargo fmt
run: cargo fmt --all -- --check

- name: Cargo clippy
run: cargo clippy --all-targets -- -D warnings

- name: Cargo build
run: cargo build --verbose

- name: Run tests
- name: Cargo test
run: cargo test --verbose

- name: Install cargo-tarpaulin@${{ env.TARPAULIN_VERSION }}
Expand All @@ -61,14 +52,14 @@ jobs:
with:
tool: cargo-tarpaulin@${{ env.TARPAULIN_VERSION }}

- name: Run tarpaulin
- name: Cargo tarpaulin
if: matrix.os == 'ubuntu-latest'
run: cargo tarpaulin --verbose

audit:
runs-on: ubuntu-latest
name: Cargo udeps and audit
needs: linter
needs: tests

steps:
- uses: actions/checkout@v4
Expand All @@ -93,11 +84,12 @@ jobs:
check-workflow-status:
name: Check Workflow Status
runs-on: ubuntu-latest
if: always()

needs:
- linter
- tests
- audit
if: always()

steps:
- name: Check Workflow Status
run: |
Expand Down