Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int: Split out server and router unit tests #275

Merged
merged 3 commits into from
Feb 23, 2024
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
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Server Tests
name: Router Tests

on:
pull_request:
paths:
- ".github/workflows/tests.yaml"
- "server/**"
- ".github/workflows/router_tests.yaml"
- "proto/**"
- "router/**"
- "launcher/**"
Expand All @@ -27,10 +26,6 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -61,19 +56,9 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
- name: Filter test dependencies
run: |
# remove stanford-stk from test requirements as it cannot install correctly without GPUs
sed -i '/stanford-stk/d' server/requirements.txt
sed -i '/stanford-stk/d' server/pyproject.toml
- name: Install
run: |
make install
- name: Run server tests
run: |
pip install pytest
export HUGGING_FACE_HUB_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }}
pytest -s -vv server/tests
make install-router install-launcher
- name: Run Rust fmt
run: |
cargo fmt --check
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/server_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Server Tests

on:
pull_request:
paths:
- ".github/workflows/server_tests.yaml"
- "server/**"
- "proto/**"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
run_tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Filter test dependencies
run: |
# remove stanford-stk from test requirements as it cannot install correctly without GPUs
sed -i '/stanford-stk/d' server/requirements.txt
sed -i '/stanford-stk/d' server/pyproject.toml
- name: Install
run: |
make install-server install-custom-kernels
- name: Run server tests
run: |
pip install pytest
export HUGGING_FACE_HUB_TOKEN=${{ secrets.HUGGING_FACE_HUB_TOKEN }}
pytest -s -vv server/tests
Loading