Skip to content

Commit

Permalink
Address various issues through the use of Cargo deny. (#862)
Browse files Browse the repository at this point in the history
Co-authored-by: Luka Skugor <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 5, 2024
1 parent 6f46268 commit dc121c3
Show file tree
Hide file tree
Showing 37 changed files with 1,130 additions and 3,441 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ inputs:
runs:
using: composite
steps:
- name: "Cargo deny checks"
id: cargo-deny
run: |
set -xe
command -v cargo-deny >/dev/null 2>&1 || {
echo Installing cargo-deny >&2
cargo install --quiet cargo-deny
}
cargo deny check -D warnings
shell: bash

- name: "Build and repin"
id: build
run: |
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: "🔒 Ensure singular opentelemetry version in Cargo.lock"
shell: bash
run: test "$(grep -n 'name = "opentelemetry"' Cargo.lock | wc -l)" -le 1

- name: "☁️ Setup runner"
uses: ./.github/workflows/manage-runner-pre

Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,12 @@ repos:
command -v rye >/dev/null || echo 'rye' not found. Please install it by following the instructions from https://rye.astral.sh/
rye run python release-controller/ci_check.py --repo-path ~/.cache/git/ic
'
- id: cargo-deny-checks
language: system
name: Cargo deny checks
verbose: true
entry: |
bash -c '
command -v cargo-deny >/dev/null || echo "'cargo-deny' not found. Please install it by running 'cargo install cargo-deny'"
cargo deny check
'
Loading

0 comments on commit dc121c3

Please sign in to comment.