Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

chore(ci): add cargo-geiger scan to ci #60

Closed
wants to merge 1 commit into from
Closed
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
46 changes: 30 additions & 16 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ jobs:
override: true
components: rustfmt, clippy

# Generate Cargo.lock, needed for the cache.
- name: Generate Cargo.lock
run: cargo generate-lockfile

# Cache.
- name: Cargo cache registry, index and build
uses: actions/[email protected]
Expand Down Expand Up @@ -62,6 +58,36 @@ jobs:
with:
max_lines_changed: 200

geiger:
if: ${{ github.repository_owner == 'maidsafe' }}
name: Cargo geiger
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

# Cache.
- name: Cargo cache registry, index and build
uses: actions/[email protected]
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}

- name: Install geiger
run: cargo install --locked cargo-geiger

# Run cargo geiger to list statistics related to the usage of unsafe Rust code in this crate and all its dependencies.
- name: Run Cargo geiger
run: cargo geiger --all-features --all-targets --all-dependencies

coverage:
name: Code coverage check
runs-on: ubuntu-latest
Expand All @@ -75,10 +101,6 @@ jobs:
toolchain: stable
override: true

# Generate Cargo.lock, needed for the cache.
- name: Generate Cargo.lock
run: cargo generate-lockfile

# Cache.
- name: Cargo cache registry, index and build
uses: actions/[email protected]
Expand Down Expand Up @@ -121,10 +143,6 @@ jobs:
toolchain: stable
override: true

# Generate Cargo.lock, needed for the cache.
- name: Generate lockfile
run: cargo generate-lockfile

# Cache.
- name: Cargo cache registry, index and build
uses: actions/[email protected]
Expand Down Expand Up @@ -154,10 +172,6 @@ jobs:
toolchain: stable
override: true

# Generate Cargo.lock, needed for the cache.
- name: Generate lockfile
run: cargo generate-lockfile

# Cache.
- name: Cargo cache registry, index and build
uses: actions/[email protected]
Expand Down