-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (60 loc) · 1.73 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
61
62
name: ORAssistant CI
run-name: ${{ github.actor }} started CI
on:
push:
branches:
- master
paths:
- 'backend/**'
- 'frontend/**'
- 'evaluation/**'
- 'Makefile'
- 'docker-compose.yml'
pull_request:
paths:
- 'backend/**'
- 'frontend/**'
- 'evaluation/**'
- 'Makefile'
- 'docker-compose.yml'
jobs:
build-backend-docker:
runs-on: self-hosted
steps:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Checkout code
uses: actions/checkout@v4
- name: Setup prereqs
run: make init-dev
- name: Run formatting checks
run: |
make check
- name: Populate environment variables
run: |
cp backend/.env.example backend/.env
sed -i 's|{{GOOGLE_API_KEY}}|${{ secrets.GOOGLE_API_KEY }}|g' backend/.env
sed -i 's|{{PATH_TO_GOOGLE_APPLICATION_CREDENTIALS}}|src/secret.json|g' backend/.env
cp backend/.env evaluation/.env
cp backend/.env frontend/.env
cp ${{ secrets.PATH_TO_GOOGLE_APPLICATION_CREDENTIALS }} backend/src
cp ${{ secrets.PATH_TO_GOOGLE_APPLICATION_CREDENTIALS }} evaluation/auto_evaluation/src
- name: Build Docker image
run: |
make docker-up
sleep 900 # TODO: Remove this after docker-compose healthcheck timeout restored fixed.
- name: Run LLM CI
working-directory: evaluation
run: |
make llm-tests
- name: Create commit comment
uses: peter-evans/commit-comment@v3
with:
token: ${{ secrets.GH_PAT }}
body-path: evaluation/auto_evaluation/llm_tests_output.txt
- name: Teardown
if: always()
run: |
make docker-down