mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-05-28 09:42:08 +00:00
* Add nix test. * Modifying yourself means you need to rerun. * Fixing the test + adding click (needed for pre-commit hooks). * Try thuis. * Our runner + pure test (not written) * Reemove server. * Root user. * Different user ? * Add the actual test target. * Forgot this modification. * Add a formatter. * Add the secrets. * Fixed the auth token ? * Adding the other tests. * Missing pre-commit. * Test requires cargo for cargo fmt. * Update it a bit. * Up. * Attempting to use a cache location for the models. * Ignore the cache for now.
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: "Nix Tests"
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/nix_tests.yaml"
|
|
- "server/**"
|
|
- "proto/**"
|
|
- "router/**"
|
|
- "launcher/**"
|
|
- "Cargo.lock"
|
|
- "rust-toolchain.toml"
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on:
|
|
group: aws-highmemory-32-plus-priv
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v27
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- uses: cachix/cachix-action@v14
|
|
with:
|
|
name: text-generation-inference
|
|
# If you chose signing key for write access
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
env:
|
|
USER: github_runner
|
|
- name: Build
|
|
run: nix develop .#test --command echo "Ok"
|
|
- name: Pre-commit tests.
|
|
run: nix develop .#test --command pre-commit run --all-files
|
|
- name: Python tests.
|
|
run: nix develop .#test --command python -m pytest server/tests/
|
|
env:
|
|
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
|
- name: Rust tests.
|
|
run: nix develop .#test --command cargo test
|