- Removed legacy modules and audit reports to streamline the codebase… #32
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| test-backend: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: pgvector/pgvector:pg16 | |
| env: | |
| POSTGRES_DB: tribrid_test | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Run linting | |
| run: uv run ruff check server | |
| - name: Run type checking | |
| run: uv run mypy server | |
| - name: Run tests | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_DB: tribrid_test | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| run: uv run pytest tests/ -v --cov=server | |
| test-frontend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: web/package-lock.json | |
| - name: Install dependencies | |
| working-directory: web | |
| run: npm ci | |
| - name: Run linting | |
| working-directory: web | |
| run: npm run lint | |
| - name: Type check | |
| working-directory: web | |
| run: npm run build | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| needs: [test-backend, test-frontend] | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t tribrid-rag:${{ github.sha }} . | |
| - name: Test Docker image | |
| run: | | |
| docker run -d --name test-container tribrid-rag:${{ github.sha }} | |
| sleep 10 | |
| docker logs test-container | |
| docker stop test-container |