Skip to content

Commit 68e6a31

Browse files
committed
chore(ci): add cargo-geiger scan to ci
1 parent 2322ebd commit 68e6a31

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/pr.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,36 @@ jobs:
5858
with:
5959
max_lines_changed: 200
6060

61+
geiger:
62+
if: ${{ github.repository_owner == 'maidsafe' }}
63+
name: Cargo geiger
64+
runs-on: ubuntu-latest
65+
steps:
66+
- uses: actions/checkout@v2
67+
- name: Install Rust
68+
uses: actions-rs/toolchain@v1
69+
with:
70+
profile: minimal
71+
toolchain: stable
72+
override: true
73+
74+
# Cache.
75+
- name: Cargo cache registry, index and build
76+
uses: actions/cache@v2.1.4
77+
with:
78+
path: |
79+
~/.cargo/registry
80+
~/.cargo/git
81+
target
82+
key: ${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}
83+
84+
- name: Install geiger
85+
run: cargo install --locked cargo-geiger
86+
87+
# Run cargo geiger to list statistics related to the usage of unsafe Rust code in this crate and all its dependencies.
88+
- name: Run Cargo geiger
89+
run: cargo geiger --all-features --all-targets --all-dependencies
90+
6191
coverage:
6292
name: Code coverage check
6393
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)