Files
Noah 44df87f211 build(stream-gears): make crate cargo-testable, drop unused deps (#1724)
* build(stream-gears): enable pyo3 extension-module via default crate feature

Plain cargo build/test of stream-gears no longer links libpython, so it
works without Python dev files. build.rs adds the macOS cdylib link args
that maturin would otherwise pass. Wheel builds are unaffected: maturin
already enabled pyo3/extension-module through pyproject.toml.

Ref #1721

* build(stream-gears): drop 13 unused dependencies and biliup-cli python-bridge feature

bytes, ormlite, rust-embed, mime_guess, tower-http, sqlx, serde,
thiserror, futures, async-channel, url, chrono and fancy-regex have no
references under crates/stream-gears/src. The python-bridge feature of
biliup-cli is declared but never used by any cfg or dependent crate.

Ref #1721

* ci(test): run cargo test for the whole workspace including stream-gears

Ref #1721
2026-09-24 03:16:55 +00:00

31 lines
646 B
YAML

name: Test
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
rust:
name: Rust tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
# biliup-cli 通过 rust-embed 嵌入 out/ 前端产物,需要先构建
- name: Build frontend
run: |
npm install
npm run build
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --locked --workspace