-
Notifications
You must be signed in to change notification settings - Fork 42
43 lines (39 loc) · 1.26 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
push:
branches:
- "main"
paths:
- "chatbot/**"
- "tests/**"
- ".github/workflows/**"
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- "chatbot/**"
- "tests/**"
- ".github/workflows/**"
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.7.0
virtualenvs-in-project: true
# Installing torch (CPU) and sentence-transformers with pip to avoid poetry's issues in installing torch.
# Installing llama-cpp-python without NVIDIA CUDA acceleration.
- name: Setup environment
run: |
poetry lock --check
poetry install --no-root --no-ansi
. .venv/bin/activate && pip3 install torch~=2.1.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
. .venv/bin/activate && pip3 install sentence-transformers~=2.2.2
. .venv/bin/activate && pip3 install llama-cpp-python~=0.2.23
- name: Run tests
run: |
poetry run python -m pytest --durations=5 --log-cli-level=DEBUG --capture=tee-sys -v