diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 9d0e54e..d15b2d1 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -7,6 +7,9 @@ on: pull_request: types: [opened, synchronize, reopened] +env: + CARGO_TERM_COLOR: always + jobs: rust: name: Custom Tools for Rust @@ -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 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 2513cdd..e16b8ee 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -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