Skip to content

Fixing pipeline

Fixing pipeline #18

Workflow file for this run

name: CI
on:
push:
branches:
- main
- 'feature/*'
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
BUCKET: pe-oss-bucket
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
working-directory: ./backend
run: |
pip install --upgrade pip
pip install uv
uv pip install -v --system --no-cache-dir \
-c constraints.txt \
-r requirements.txt \
-r requirements-dev.txt
- name: Docker login (if needed for private images)
if: env.DOCKER_USERNAME != '' && env.DOCKER_PASSWORD != ''
run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- name: Start Minio service
run: |
docker run -d --name minio -p 9000:9000 \
-e MINIO_ROOT_USER=CHANGEME \
-e MINIO_ROOT_PASSWORD=CHANGEME \
minio/minio server /data
- name: Create database directory
working-directory: ./backend
run: |
mkdir -p data
- name: Run tests
working-directory: ./backend
env:
MINIO_ENDPOINT: http://localhost:9000
MINIO_ROOT_USER: CHANGEME
MINIO_ROOT_PASSWORD: CHANGEME
PYTHONPATH: ./src:.
run: |
# Give Minio some time to start
sleep 10
# Run your tests
pytest