Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
backend-lint:
name: Backend Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v4

- name: Set up poetry
run: pipx install poetry==2.1.2

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
cache-dependency-path: ./backend/poetry.lock
Comment on lines +19 to +27
Copy link
Collaborator

@karlatcodecentric karlatcodecentric Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to install pipx independently of python? If however possible, it should be better / more clear described how pipx could be installed without installing python first.


- name: Install dependencies
run: poetry install --only=main,dev

- name: Run linting
run: poetry run pre-commit run --all-files

frontend-lint:
name: Frontend Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20.14'
cache: 'npm'
cache-dependency-path: './frontend/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Run linting
run: npm run lint
91 changes: 91 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
backend-tests:
name: Backend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pgpassword
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
PG_HOST: localhost
PG_USER: pguser
PG_PASSWORD: pgpassword
PG_DB: postgres
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pgpassword
POSTGRES_DB: postgres
LLM_EVAL_ENCRYPTION_KEY: M2kbagZtWPjxfjeDio2VDH+sVH45BsUHUxHzR+hW3Ps=
steps:
- uses: actions/checkout@v4

- name: Set up poetry
run: pipx install poetry==2.1.2

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
cache-dependency-path: ./backend/poetry.lock

- name: Install dependencies
run: poetry install --only=main,dev,test

- name: Running tests
run: poetry run pytest --cov llm_eval --cov-report=xml tests

- name: Upload backend coverage report
uses: actions/upload-artifact@v4
with:
name: backend-coverage
path: ./backend/coverage.xml
if-no-files-found: error

frontend-tests:
name: Frontend Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20.14'
cache: 'npm'
cache-dependency-path: './frontend/package-lock.json'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test:coverage -- --reporter=json --outputFile=coverage/coverage-final.json

- name: Upload frontend coverage report
uses: actions/upload-artifact@v4
with:
name: frontend-coverage
path: ./frontend/coverage/coverage-final.json
if-no-files-found: error