Skip to content

Commit

Permalink
ci: Adding RustSec and CargoFmt jobs (#55)
Browse files Browse the repository at this point in the history
* ci: Adding RustSec and CargoFmt jobs

* build: Updating the lockfile
  • Loading branch information
dandxy89 committed Feb 14, 2024
1 parent d9f8a82 commit 90e557a
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 15 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cargo_fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
paths:
- "**.rs"

name: Cargo fmt

jobs:
format:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt # ,clippy
# https://github.com/marketplace/actions/rust-rustfmt-check
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: Format Rust code using rustfmt"
23 changes: 23 additions & 0 deletions .github/workflows/rustsec_audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Security Audit

# Ignore List
# - RUSTSEC-2020-0071 => Potential segfault in the time crate

on:
pull_request:
types: [assigned, opened, synchronize, reopened]
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
schedule:
- cron: "0 0 * * 1" # every Monday at 00:00 UTC

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ignore: RUSTSEC-2020-0071
29 changes: 14 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 90e557a

Please sign in to comment.