build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 in /frontend (#16) #77
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: 🚀 Convergio CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ master, develop ] | |
| pull_request: | |
| branches: [ master ] | |
| env: | |
| PYTHON_VERSION: "3.11" | |
| NODE_VERSION: "18" | |
| jobs: | |
| test-backend: | |
| name: 🧪 Backend Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15-alpine | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_USER: postgres | |
| POSTGRES_DB: convergio_test | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| redis: | |
| image: redis:7-alpine | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 6379:6379 | |
| steps: | |
| - name: 📥 Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: 🐍 Set up Python ${{ env.PYTHON_VERSION }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: 📦 Cache Python Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('backend/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: 🔧 Install Dependencies | |
| working-directory: ./backend | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: 🧪 Run Unit Tests with Coverage | |
| working-directory: ./backend | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_DB: convergio_test | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 | |
| OPENAI_API_KEY: "sk-test" | |
| ANTHROPIC_API_KEY: "ant-test" | |
| run: | | |
| python -m pytest --cov=src --cov-report=xml --cov-report=term-missing -v || true | |
| - name: ⬆️ Upload Coverage Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: backend-coverage-xml | |
| path: backend/coverage.xml | |
| test-frontend: | |
| name: 🎨 Frontend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: 📦 Setup Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: 🔧 Install Frontend Dependencies | |
| working-directory: ./frontend | |
| run: npm ci | |
| - name: 🏗️ Build Frontend | |
| working-directory: ./frontend | |
| run: npm run build | |
| docker-build: | |
| name: 🐳 Docker Build Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: 🐳 Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: 🏗️ Build Backend Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./backend | |
| push: false | |
| tags: convergio-backend:test | |
| - name: 🏗️ Build Frontend Image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./frontend | |
| push: false | |
| tags: convergio-frontend:test |