Skip to content

Generalize body predicates with HttpPartition trait #443

Generalize body predicates with HttpPartition trait

Generalize body predicates with HttpPartition trait #443

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request: {}
jobs:
check:
# Run `cargo check` first to ensure that the pushed code at least compiles.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.89.0, stable]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check --all --bins --tests --benches
test:
needs: check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.89.0, stable]
redis-version: [7]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
# Starts Redis server needed by hitbox-redis for integration tests.
- name: Start Redis
uses: supercharge/redis-github-action@1.8.0
with:
redis-version: ${{ matrix.redis-version }}
- name: Run tests
run: cargo test --workspace --all-features
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.rust }}-redis${{ matrix.redis-version }}
path: target/cucumber-junit.xml
if-no-files-found: ignore
- name: Publish test report
if: always()
uses: mikepenz/action-junit-report@v4
with:
report_paths: "target/cucumber-junit.xml"
check_name: "Test Report (${{ matrix.rust }}, Redis ${{ matrix.redis-version }})"
fail_on_failure: true
include_passed: true
detailed_summary: true
- name: Install llvm-cov
if: matrix.rust == 'stable' && matrix.redis-version == 7
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate coverage file
if: matrix.rust == 'stable' && matrix.redis-version == 7
run: |
cargo llvm-cov --workspace --all-features --lcov --output-path lcov.info --ignore-filename-regex 'hurl/'
- name: Upload to Codecov
if: matrix.rust == 'stable' && matrix.redis-version == 7
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: false
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --workspace --all-features --bins --examples --tests --benches -- -D warnings
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Format check
run: cargo fmt --all -- --check
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Documentation
run: cargo doc --workspace --all-features --no-deps
env:
RUSTDOCFLAGS: -D warnings