mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
chore: 移除废弃的 build-hub workflow,格式化测试代码
This commit is contained in:
91
.github/workflows/build-hub.yml
vendored
91
.github/workflows/build-hub.yml
vendored
@@ -1,91 +0,0 @@
|
|||||||
name: Build aether-hub
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags: ['hub-v*']
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: ${{ matrix.name }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- name: linux-amd64
|
|
||||||
target: x86_64-unknown-linux-gnu
|
|
||||||
use_cross: true
|
|
||||||
- name: linux-arm64
|
|
||||||
target: aarch64-unknown-linux-gnu
|
|
||||||
use_cross: true
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
targets: ${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Rust cache
|
|
||||||
uses: Swatinem/rust-cache@v2
|
|
||||||
with:
|
|
||||||
workspaces: aether-hub -> target
|
|
||||||
key: ${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: Install cross
|
|
||||||
if: matrix.use_cross
|
|
||||||
uses: taiki-e/install-action@cross
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
working-directory: aether-hub
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [ "${{ matrix.use_cross }}" = "true" ]; then
|
|
||||||
cross build --release --target ${{ matrix.target }}
|
|
||||||
else
|
|
||||||
cargo build --release --target ${{ matrix.target }}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Package
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd aether-hub/target/${{ matrix.target }}/release
|
|
||||||
chmod +x aether-hub
|
|
||||||
tar czf ../../../../aether-hub-${{ matrix.name }}.tar.gz aether-hub
|
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v5
|
|
||||||
with:
|
|
||||||
name: aether-hub-${{ matrix.name }}
|
|
||||||
path: aether-hub-*.tar.gz
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
release:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
steps:
|
|
||||||
- name: Download all artifacts
|
|
||||||
uses: actions/download-artifact@v5
|
|
||||||
with:
|
|
||||||
merge-multiple: true
|
|
||||||
path: artifacts
|
|
||||||
|
|
||||||
- name: Generate checksums
|
|
||||||
working-directory: artifacts
|
|
||||||
run: sha256sum aether-hub-* > SHA256SUMS.txt
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
name: "${{ github.ref_name }}"
|
|
||||||
generate_release_notes: true
|
|
||||||
files: |
|
|
||||||
artifacts/aether-hub-*
|
|
||||||
artifacts/SHA256SUMS.txt
|
|
||||||
fail_on_unmatched_files: true
|
|
||||||
@@ -412,7 +412,10 @@ async fn gateway_handles_admin_provider_query_models_respecting_key_api_formats(
|
|||||||
assert_eq!(payload["success"], json!(true));
|
assert_eq!(payload["success"], json!(true));
|
||||||
assert_eq!(payload["data"]["error"], serde_json::Value::Null);
|
assert_eq!(payload["data"]["error"], serde_json::Value::Null);
|
||||||
assert_eq!(payload["data"]["from_cache"], json!(false));
|
assert_eq!(payload["data"]["from_cache"], json!(false));
|
||||||
assert_eq!(payload["data"]["models"][0]["api_formats"], json!(["openai:cli"]));
|
assert_eq!(
|
||||||
|
payload["data"]["models"][0]["api_formats"],
|
||||||
|
json!(["openai:cli"])
|
||||||
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
*execution_runtime_hits.lock().expect("mutex should lock"),
|
*execution_runtime_hits.lock().expect("mutex should lock"),
|
||||||
1
|
1
|
||||||
|
|||||||
Reference in New Issue
Block a user