Skip to content

Commit

Permalink
add cargo-deny to CI (#59)
Browse files Browse the repository at this point in the history
* add cargo-deny to CI

* automerge dependabot PRs

* add lockfile to VCS

---------

Co-authored-by: daniel.eades <daniel.eades@hotmail.com>
  • Loading branch information
danieleades and daniel.eades authored Nov 25, 2023
1 parent 9a2633d commit 85818d6
Show file tree
Hide file tree
Showing 6 changed files with 1,426 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cargo.lock binary
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
interval: monthly
- package-ecosystem: github-actions
directory: "/"
schedule:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,22 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo doc --no-deps

cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

# Automatically merge if it's a Dependabot PR that passes the build
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
needs: [test, fmt, clippy, docs, cargo-deny]
steps:
- uses: actions/checkout@v4
- name: Auto-merge Dependabot PRs
# Find the PR number based on the current branch name, and squash merge based on this number
run: 'PR_NUM="$(gh pr list | grep $(git branch --show-current) | cut -f1)"; gh pr merge --auto --squash $PR_NUM'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/target
**/*.rs.bk
Cargo.lock
Loading

0 comments on commit 85818d6

Please sign in to comment.