Spaces:
Sleeping
Sleeping
NeonCharlie-24 commited on
Initial setup of GitHub Actions workflow (#20)
Browse files* Initial setup of GitHub Actions workflow
* update pytest command to run all unit test in app/tests with ignore flags for incorrectly formatted files.
* revert to running only persona config tests for now.
.github/workflows/unit_tests.yml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Run Unit Tests
|
| 2 |
+
on:
|
| 3 |
+
pull_request:
|
| 4 |
+
workflow_dispatch:
|
| 5 |
+
|
| 6 |
+
jobs:
|
| 7 |
+
unit_tests:
|
| 8 |
+
strategy:
|
| 9 |
+
matrix:
|
| 10 |
+
python-version: ['3.10', '3.11', '3.12']
|
| 11 |
+
runs-on: ubuntu-latest
|
| 12 |
+
timeout-minutes: 15
|
| 13 |
+
steps:
|
| 14 |
+
- uses: actions/checkout@v4
|
| 15 |
+
|
| 16 |
+
- name: Set up Python ${{ matrix.python-version }}
|
| 17 |
+
uses: actions/setup-python@v5
|
| 18 |
+
with:
|
| 19 |
+
python-version: ${{ matrix.python-version }}
|
| 20 |
+
|
| 21 |
+
- name: Install dependencies
|
| 22 |
+
working-directory: multi_llm_chatbot_backend
|
| 23 |
+
run: |
|
| 24 |
+
pip install wheel
|
| 25 |
+
pip install -r requirements.txt -r test_requirements.txt
|
| 26 |
+
|
| 27 |
+
- name: Run unit tests
|
| 28 |
+
working-directory: multi_llm_chatbot_backend
|
| 29 |
+
run: |
|
| 30 |
+
pytest app/tests/test_persona_config.py --junitxml=test-results/results.xml
|
| 31 |
+
|
| 32 |
+
- name: Upload test results
|
| 33 |
+
if: always()
|
| 34 |
+
uses: actions/upload-artifact@v4
|
| 35 |
+
with:
|
| 36 |
+
name: test-results-py${{ matrix.python-version }}
|
| 37 |
+
path: multi_llm_chatbot_backend/test-results/
|