Update tests.yaml

This commit is contained in:
Pauline Bailly-Masson 2025-04-10 15:16:14 +02:00 committed by GitHub
parent 13d45ebf0d
commit f124e8422c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,67 +1,79 @@
name: Server Tests ---
name: Ci-test
on: on:
pull_request: workflow_dispatch:
paths:
- ".github/workflows/tests.yaml"
- "server/**"
- "proto/**"
- "router/**"
- "launcher/**"
- "backends/**"
- "Cargo.lock"
- "rust-toolchain.toml"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs: jobs:
run_tests: Ci-test:
runs-on: runs-on:
group: aws-highmemory-32-plus-priv group: aws-dl1-24xlarge
steps: steps:
- uses: actions/checkout@v4 - run: |
- name: Set up Python echo "🎉 This job uses runner scale set runners!"
uses: actions/setup-python@v4 # name: Server Tests
id: python
with: # on:
python-version: 3.11 # pull_request:
- uses: dtolnay/rust-toolchain@1.85.0 # paths:
with: # - ".github/workflows/tests.yaml"
components: rustfmt, clippy # - "server/**"
- name: Install Protoc # - "proto/**"
uses: arduino/setup-protoc@v1 # - "router/**"
- name: Clean unused files # - "launcher/**"
run: | # - "backends/**"
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android # - "Cargo.lock"
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET # - "rust-toolchain.toml"
- name: Install
run: | # concurrency:
sudo apt update # group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
sudo apt install python3.11-dev -y # cancel-in-progress: true
pip install -U pip uv
uv venv # jobs:
source ./.venv/bin/activate # run_tests:
make install-cpu # runs-on:
- name: Download locked kernels # group: aws-highmemory-32-plus-priv
run: | # steps:
source ./.venv/bin/activate # - uses: actions/checkout@v4
kernels download server # - name: Set up Python
- name: Run server tests # uses: actions/setup-python@v4
run: | # id: python
source ./.venv/bin/activate # with:
uv pip install pytest # python-version: 3.11
export HF_TOKEN=${{ secrets.HF_TOKEN }} # - uses: dtolnay/rust-toolchain@1.85.0
pytest -s -vv server/tests # with:
- name: Pre-commit checks # components: rustfmt, clippy
run: | # - name: Install Protoc
pip install pre-commit # uses: arduino/setup-protoc@v1
pre-commit install # - name: Clean unused files
pre-commit run --all-files # run: |
- name: Run Rust tests # sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
run: | # sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
cargo test # - name: Install
- name: Run Rust tests with google feature # run: |
run: | # sudo apt update
cargo test --features google # sudo apt install python3.11-dev -y
# pip install -U pip uv
# uv venv
# source ./.venv/bin/activate
# make install-cpu
# - name: Download locked kernels
# run: |
# source ./.venv/bin/activate
# kernels download server
# - name: Run server tests
# run: |
# source ./.venv/bin/activate
# uv pip install pytest
# export HF_TOKEN=${{ secrets.HF_TOKEN }}
# pytest -s -vv server/tests
# - name: Pre-commit checks
# run: |
# pip install pre-commit
# pre-commit install
# pre-commit run --all-files
# - name: Run Rust tests
# run: |
# cargo test
# - name: Run Rust tests with google feature
# run: |
# cargo test --features google