Skip to content

Commit 9578300

Browse files
authored
Fix feature check in CI (#428)
1 parent b20cb6b commit 9578300

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ jobs:
2424
- name: Install Rust Stable
2525
run: rustup default stable
2626
- name: Install cargo-hack
27-
run: cargo install cargo-hack
27+
uses: taiki-e/install-action@v2
28+
with:
29+
tool: cargo-hack
2830
- name: Check Feature Matrix
29-
run: cargo hack build --all --all-targets --feature-powerset
31+
run: cargo hack check --all --all-targets --feature-powerset --release
3032
test:
3133
name: Test ${{ matrix.rust_version }}
3234
runs-on: ubuntu-latest

metrics-exporter-prometheus/src/builder.rs

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use hyper::{
2929
http::HeaderValue,
3030
Method, Request, Uri,
3131
};
32+
#[cfg(feature = "push-gateway")]
3233
use hyper_tls::HttpsConnector;
3334

3435
use indexmap::IndexMap;

netlify.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
[build]
22
command = """
33
rustup install nightly --profile minimal && \
4-
cargo doc --no-deps --workspace --exclude=metrics-observer && cp -r target/doc _netlify_out
4+
PROTOC_ZIP=protoc-3.14.0-linux-x86_64.zip && \
5+
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$PROTOC_ZIP && \
6+
unzip $PROTOC_ZIP && \
7+
PATH=$PATH:/$PWD/bin cargo +nightly doc --no-deps --workspace --exclude=metrics-observer && \
8+
cp -r target/doc _netlify_out
59
"""
610
environment = { RUSTDOCFLAGS= "--cfg docsrs" }
711
publish = "_netlify_out"

0 commit comments

Comments
 (0)