reqwest-middleware/.github/workflows/ci.yml

137 lines
3.5 KiB
YAML

on:
push:
branches: [main]
pull_request:
name: CI # Continuous Integration
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
strategy:
matrix:
otel_version:
- opentelemetry_0_20
- opentelemetry_0_21
- opentelemetry_0_22
- opentelemetry_0_23
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-targets --features "reqwest-tracing/deprecated_attributes, ${{ matrix.otel_version }}"
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
matrix:
otel_version:
- opentelemetry_0_20
- opentelemetry_0_21
- opentelemetry_0_22
- opentelemetry_0_23
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: clippy
- name: Clippy check
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --features "reqwest-tracing/deprecated_attributes, ${{ matrix.otel_version }}" --workspace -- -D warnings
typos:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@master
docs:
name: Docs
runs-on: ubuntu-latest
strategy:
matrix:
otel_version:
- opentelemetry_0_20
- opentelemetry_0_21
- opentelemetry_0_22
- opentelemetry_0_23
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Check documentation
env:
RUSTDOCFLAGS: -D warnings
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --document-private-items --features "reqwest-tracing/deprecated_attributes, ${{ matrix.otel_version }}" --workspace
publish-check:
name: Publish dry run
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: actions-rs/cargo@v1
with:
command: publish
args: --dry-run --manifest-path reqwest-middleware/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: publish
args: --dry-run --manifest-path reqwest-retry/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: publish
args: --dry-run --manifest-path reqwest-tracing/Cargo.toml