Skip to content

Commit 87e105a

Browse files
authored
Merge pull request trustyai-explainability#45 from m-misiura/lls_test_upstream
Run unit tests with both lls stable and main
2 parents b299d16 + be4a3e2 commit 87e105a

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

.github/workflows/test-unit.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,48 @@
11
name: Run Unit Tests
22

33
on:
4+
push:
5+
branches: [main, lls_test_upstream]
46
pull_request:
57
branches: [main]
68

79
jobs:
810
test:
9-
name: Run Tests
11+
name: "Test with ${{ matrix.test-name }}"
1012
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
include:
16+
- python-version: "3.12"
17+
llama-stack-source: "stable"
18+
test-name: "llama-stack stable (pyproject.toml)"
19+
install-cmd: "python -m pip install -e \".[test]\""
20+
- python-version: "3.12"
21+
llama-stack-source: "main"
22+
test-name: "llama-stack main branch (upstream)"
23+
install-cmd: "python -m pip install git+https://github.com/llamastack/llama-stack.git@main && python -m pip install -e \".[test]\""
24+
fail-fast: false
1125

1226
steps:
1327
- name: Checkout code
1428
uses: actions/checkout@v4
1529

16-
- name: Set up Python
30+
- name: Set up Python ${{ matrix.python-version }}
1731
uses: actions/setup-python@v4
1832
with:
19-
python-version: '3.12'
33+
python-version: ${{ matrix.python-version }}
2034

2135
- name: Install dependencies
2236
run: |
2337
python -m pip install --upgrade pip
24-
python -m pip install -e ".[test]"
38+
${{ matrix.install-cmd }}
2539
2640
- name: Run tests
2741
run: |
28-
python -m pytest tests/unit/ -v
42+
python -m pytest tests/unit/ -v
43+
44+
- name: Display test environment info
45+
run: |
46+
echo "Testing with: ${{ matrix.test-name }}"
47+
python -c "import llama_stack; print(f'llama-stack location: {llama_stack.__file__}')"
48+
python -m pip show llama-stack

0 commit comments

Comments
 (0)