Skip to content

Commit 80d6971

Browse files
committed
feature: test backend workflow
1 parent a47acff commit 80d6971

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/test.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
branches:
7+
- main
8+
9+
jobs:
10+
backend-tests:
11+
name: Backend Tests
12+
runs-on: ubuntu-latest
13+
defaults:
14+
run:
15+
working-directory: ./backend
16+
services:
17+
postgres:
18+
image: postgres
19+
env:
20+
POSTGRES_USER: pguser
21+
POSTGRES_PASSWORD: pgpassword
22+
POSTGRES_DB: postgres
23+
options: >-
24+
--health-cmd pg_isready
25+
--health-interval 10s
26+
--health-timeout 5s
27+
--health-retries 5
28+
env:
29+
PG_HOST: postgres
30+
PG_USER: pguser
31+
PG_PASSWORD: pgpassword
32+
PG_DB: postgres
33+
POSTGRES_USER: pguser
34+
POSTGRES_PASSWORD: pgpassword
35+
POSTGRES_DB: postgres
36+
LLM_EVAL_ENCRYPTION_KEY: M2kbagZtWPjxfjeDio2VDH+sVH45BsUHUxHzR+hW3Ps=
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Set up poetry
41+
run: pipx install poetry==2.1.2
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: '3.12'
47+
cache: 'poetry'
48+
cache-dependency-path: ./backend/poetry.lock
49+
50+
- name: Install dependencies
51+
run: poetry install --only=main,dev,test
52+
53+
- name: Run linting
54+
run: poetry run pytest --cov llm_eval tests

0 commit comments

Comments
 (0)