name: Build and Test
on:
- push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
id: install-rust
with:
components: rustfmt, clippy
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Run tests
run: cargo hack test --feature-powerset --skip default
- name: Lint
run: |
cargo fmt --check --package tracing-datadog
cargo clippy --all-features -- -D warnings
- name: Build docs
run: |
cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: -D warnings