-
Notifications
You must be signed in to change notification settings - Fork 28
60 lines (50 loc) · 2.19 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: biochatter Continuous Integration
on: [push]
jobs:
test:
runs-on: ubuntu-latest
environment: 'Test CI'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Docker
run: |
sudo apt remove containerd.io
sudo apt install -y docker.io
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
poetry install
poetry install -E 'podcast xinference'
- name: Start Milvus server
run: |
docker-compose -f milvus-docker-compose.yml up -d
- name: Set API key
run: |
echo ${{ secrets.OPENAI_API_KEY }} > api_key.txt
echo ${{ secrets.AZURE_TEST_OPENAI_MODEL_NAME }} > azure_test_model.txt
echo ${{ secrets.AZURE_TEST_OPENAI_DEPLOYMENT_NAME }} > azure_test_deployment.txt
echo ${{ secrets.AZURE_TEST_OPENAI_API_VERSION }} > azure_test_api_version.txt
echo ${{ secrets.AZURE_TEST_OPENAI_API_BASE }} > azure_test_api_base.txt
echo ${{ secrets.AZURE_TEST_OPENAI_API_KEY }} > azure_test_api_key.txt
- name: Set environment variable
run: |
echo "OPENAI_API_KEY=$(cat api_key.txt)" >> $GITHUB_ENV
echo "AZURE_TEST_OPENAI_MODEL_NAME=$(cat azure_test_model.txt)" >> $GITHUB_ENV
echo "AZURE_TEST_OPENAI_DEPLOYMENT_NAME=$(cat azure_test_deployment.txt)" >> $GITHUB_ENV
echo "AZURE_TEST_OPENAI_API_VERSION=$(cat azure_test_api_version.txt)" >> $GITHUB_ENV
echo "AZURE_TEST_OPENAI_API_BASE=$(cat azure_test_api_base.txt)" >> $GITHUB_ENV
echo "AZURE_TEST_OPENAI_API_KEY=$(cat azure_test_api_key.txt)" >> $GITHUB_ENV
- name: Run tests
run: |
poetry run pytest test --ignore=./volumes