Skip to content

Commit

Permalink
adding new code-quality ci steps
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmmolina committed Jul 13, 2024
1 parent 0d69346 commit 5ab39dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 29 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
pull_request:
types: [opened, synchronize, reopened]

env:
CARGO_TERM_COLOR: always

jobs:
rust:
name: Custom Tools for Rust
Expand Down Expand Up @@ -47,39 +50,22 @@ jobs:
components: rustfmt, clippy

- name: Install Tools
env:
CARGO_TERM_COLOR: always
run: |
cargo install --force cargo-audit
cargo install --force cargo-deny
cargo install --force cargo-outdated
cargo install cargo-audit
cargo install cargo-udeps
cargo install cargo-sonar
- name: Run `clippy`
env:
CARGO_TERM_COLOR: always
run: cargo clippy --message-format=json > clippy.json

- name: Run `cargo-audit`
env:
CARGO_TERM_COLOR: always
run: cargo audit --json > audit.json

- name: Run `cargo-deny`
env:
CARGO_TERM_COLOR: always
run: cargo deny --format json check 2> deny.json

- name: Run `cargo-outdated`
env:
CARGO_TERM_COLOR: always
run: cargo outdated --workspace --depth 1 --format json > outdated.json
- name: Run `cargo-udeps`
run: cargo +nightly udeps --quiet --workspace --output json > udeps.json || true

- name: Convert to Report
env:
CARGO_TERM_COLOR: always
run: |
cargo install cargo-sonar
cargo sonar --clippy --audit --deny --outdated
- name: Run `cargo-sonar`
run: cargo sonar --clippy --audit --outdated

- name: Upload Report Artifact
uses: actions/upload-artifact@v2
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Unit tests
name: Unit Tests

on:
pull_request:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: coverage
name: Coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- name: Checkout repository
- name: Checkout Repository
uses: actions/checkout@v2

- name: Generate code coverage
- name: Generate Code Coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml --fail-under 50

0 comments on commit 5ab39dc

Please sign in to comment.