1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-07-01 20:25:09 +02:00
* Use matrix to test all versions.

* Add support for OTEL 0.16

* Typo.

* Fail on warnings.

* Inject headers when using OTEL 0.16.

* Fix.
This commit is contained in:
Luca Palmieri
2021-08-30 13:36:15 +02:00
committed by GitHub
parent 1f3ecfe182
commit 050bfe058d
6 changed files with 65 additions and 15 deletions

View File

@ -13,9 +13,12 @@ env:
CARGO_TERM_COLOR: always
jobs:
test:
test_without_otel:
name: Test
runs-on: ubuntu-latest
env:
# Fail the build if there are warnings
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
@ -35,18 +38,40 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
test_with_otel:
name: Test
runs-on: ubuntu-latest
env:
# Fail the build if there are warnings
RUSTFLAGS: "-D warnings"
strategy:
matrix:
otel_version:
- opentelemetry_0_13
- opentelemetry_0_14
- opentelemetry_0_15
- opentelemetry_0_16
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --features opentelemetry_0_13
- uses: actions-rs/cargo@v1
with:
command: test
args: --features opentelemetry_0_14
- uses: actions-rs/cargo@v1
with:
command: test
args: --features opentelemetry_0_15
args: --features ${{ matrix.otel_version }}
fmt:
name: Rustfmt