-
Notifications
You must be signed in to change notification settings - Fork 30
49 lines (41 loc) · 1.83 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
push:
branches:
- main
pull_request:
branches:
- main
name: CI
jobs:
build_and_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Lint
# Note: GitHub hosted runners using the latest stable version of Rust have Clippy pre-installed.
- run: cargo clippy --features=metrics-0_21,prometheus-exporter
- run: cargo clippy --features=prometheus-0_13
- run: cargo clippy --features=prometheus-client-0_22
- run: cargo clippy --features=opentelemetry-0_24
# Run the tests with each of the different metrics libraries
- run: cargo test --features=prometheus-exporter
- run: cargo test --features=prometheus-exporter,metrics-0_21
- run: cargo test --features=prometheus-exporter,prometheus-0_13
- run: cargo test --features=prometheus-exporter,prometheus-client-0_22,exemplars-tracing
- run: cargo test --features=prometheus-exporter,prometheus-client-0_22,exemplars-tracing-opentelemetry-0_24
- run: cargo test --features=prometheus-exporter,opentelemetry-0_24
# Build the crate using the other optional features
- run: cargo build --features=metrics-0_21,custom-objective-percentile,custom-objective-latency
# Compile the examples
- run: cargo build --package example-actix-web
- run: cargo build --package example-axum
- run: cargo build --package example-custom-metrics
- run: cargo build --package example-exemplars-tracing
- run: cargo build --package example-exemplars-tracing-opentelemetry
- run: cargo build --package example-full-api
- run: cargo build --package example-opentelemetry-push
# Make sure the docs can be built
- run: cargo doc --all-features