Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/rust-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
pull_request:
paths:
- .github/workflows/rust-publish.yml
- Cargo.toml
- crates/**/Cargo.toml
workflow_dispatch:
inputs:
mode:
Expand Down Expand Up @@ -46,6 +48,31 @@ jobs:

- uses: rui314/setup-mold@v1

- name: Validate registry metadata
run: |
python3 - <<'PY'
import json
import subprocess

metadata = json.loads(
subprocess.check_output(
["cargo", "metadata", "--no-deps", "--format-version", "1", "--locked"],
text=True,
)
)
errors = []
for package in metadata["packages"]:
if package["publish"] == []:
continue
if not (package.get("description") or "").strip():
errors.append(f"{package['name']}: missing description")
if not package.get("license") and not package.get("license_file"):
errors.append(f"{package['name']}: missing license or license-file")
if errors:
raise SystemExit("\n".join(errors))
print("All publishable crates have the required registry metadata")
PY

- name: Validate Rust crate packages
if: github.event_name == 'pull_request'
run: cargo package --workspace --exclude lance-context-python --allow-dirty --no-verify --all-features --locked
Expand Down
1 change: 1 addition & 0 deletions crates/lance-context-metrics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "lance-context-metrics"
version = "0.1.0"
description = "Shared Prometheus metrics and HTTP instrumentation for lance-context"
edition.workspace = true
license.workspace = true

Expand Down
Loading