Skip to content

Commit

Permalink
ci: audit and udeps (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
milancermak committed Jan 10, 2022
1 parent 6af00e8 commit dca4a30
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on:
schedule:
# 2:20 past midnight UTC
- cron: "20 2 * * *"

name: Security audit
jobs:
audit:
name: Audit
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Run audit check
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Checkout source code
uses: actions/checkout@v2

- name: Use stable toolchain
- name: Setup toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/udeps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
branches:
- master
pull_request:

name: Unused deps
jobs:
udeps:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2

- name: Setup nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true

- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install udeps
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-udeps --locked

- name: Run udeps
uses: actions-rs/cargo@v1
with:
command: udeps
2 changes: 2 additions & 0 deletions starknet-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ base64 = "0.13.0"
ethereum-types = "0.12.1"
hex = "0.4.3"
serde = { version = "1.0.133", features = ["derive"] }

[dev-dependencies]
serde_json = "1.0.74"

0 comments on commit dca4a30

Please sign in to comment.