Skip to content

Added logic to automatically infer list of metrics and labels for each metric from Prometheus #221

Added logic to automatically infer list of metrics and labels for each metric from Prometheus

Added logic to automatically infer list of metrics and labels for each metric from Prometheus #221

Workflow file for this run

name: Rust Projects CI
on:
push:
branches: [ main ]
paths:
- 'asap-query-engine/**'
- 'asap-common/dependencies/rs/**'
- 'asap-common/tests/**'
- 'asap-common/sketch-core/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust.yml'
pull_request:
branches: [ main ]
paths:
- 'asap-query-engine/**'
- 'asap-common/dependencies/rs/**'
- 'asap-common/tests/**'
- 'asap-common/sketch-core/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
format-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
env:
RUSTC_WRAPPER: sccache
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
- name: Run all workspace tests
run: cargo test --workspace --locked
env:
RUSTC_WRAPPER: sccache
docker:
runs-on: ubuntu-latest
needs: [format-and-lint, test]
steps:
- uses: actions/checkout@v4
# - name: Configure git for private dependencies
# run: git config --global url."https://x-access-token:${{ secrets.PRIVATE_REPO_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: docker build -f asap-query-engine/Dockerfile -t sketchdb-queryengine-rust:latest .