Skip to content

feat: Unify agent control dynamic config traits into one agent control dynamic config repository #3263

feat: Unify agent control dynamic config traits into one agent control dynamic config repository

feat: Unify agent control dynamic config traits into one agent control dynamic config repository #3263

Workflow file for this run

permissions:
contents: read
on:
pull_request:
merge_group:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: checks
jobs:
codespell:
name: codespell
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Codespell test
uses: codespell-project/actions-codespell@94259cd8be02ad2903ba34a22d9c13de21a74461
fmt:
runs-on: ubuntu-latest
name: stable / fmt
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust version from project
run: |
RUST_VERSION=$(grep "rust-version" Cargo.toml | cut -d "=" -f2 | tr -d "[:space:]")
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
- name: Install Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: ${{ env.RUST_VERSION }}
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-checks
- name: Check code formatting
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
name: cargo clippy
permissions:
contents: read
checks: write
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust version from project
run: |
RUST_VERSION=$(grep "rust-version" Cargo.toml | cut -d "=" -f2 | tr -d "[:space:]")
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
- name: Install Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-checks
- name: cargo clippy
run: cargo clippy --workspace --tests -- -D clippy::all
doc:
runs-on: ubuntu-latest
name: stable / doc
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust version from project
run: |
RUST_VERSION=$(grep "rust-version" Cargo.toml | cut -d "=" -f2 | tr -d "[:space:]")
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
- name: Install Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-checks
- name: Create documentation
run: cargo doc --no-deps --package newrelic_agent_control
env:
RUSTDOCFLAGS: --cfg docsrs
third-party-notices-check:
runs-on: ubuntu-latest
name: ⚖️ Check third party licenses
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Obtain Rust version from project
run: |
RUST_VERSION=$(grep "rust-version" Cargo.toml | cut -d "=" -f2 | tr -d "[:space:]")
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
- name: Install Rust ${{ env.RUST_VERSION }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-checks
- name: Fetch dependencies
run: cargo fetch
- uses: newrelic/rust-licenses-noticer@v1
with:
template-file: THIRD_PARTY_NOTICES.md.tmpl
unused-dependencies-check:
name: Check unused dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@575f713d0233afba556737a7b85080563be14186
with:
tool: cargo-shear@1.1.11
- run: cargo shear