Skip to content

chore(deps)(deps): bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /frontend #821

chore(deps)(deps): bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /frontend

chore(deps)(deps): bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 in /frontend #821

Workflow file for this run

name: CI Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
permissions:
contents: read
packages: write
id-token: write
jobs:
backend-test:
name: Backend Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: screener_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
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 code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: backend/requirements.txt
- name: Install dependencies
working-directory: backend
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests with coverage
working-directory: backend
env:
DATABASE_URL: postgresql+asyncpg://postgres:postgres@localhost:5432/screener_test
REDIS_URL: redis://localhost:6379/0
SECRET_KEY: test-secret-key-for-ci
ALGORITHM: HS256
ACCESS_TOKEN_EXPIRE_MINUTES: 30
PYTHONPATH: ${{ github.workspace }}/backend
run: |
pytest --cov=app --cov-report=xml --cov-report=term
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: backend/coverage.xml
flags: backend
name: backend-coverage
backend-lint:
name: Backend Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install black flake8 mypy isort
- name: Run black
working-directory: backend
run: black --check . || echo "⚠️ Black formatting issues found (non-blocking)"
continue-on-error: true
- name: Run isort
working-directory: backend
run: isort --check-only . || echo "⚠️ Import sorting issues found (non-blocking)"
continue-on-error: true
- name: Run flake8
working-directory: backend
run: flake8 app tests --max-line-length=100 --extend-ignore=E203,W503 || echo "⚠️ Flake8 issues found (non-blocking)"
continue-on-error: true
- name: Run mypy
working-directory: backend
run: mypy app --ignore-missing-imports || echo "⚠️ Type checking issues found (non-blocking)"
continue-on-error: true
frontend-test:
name: Frontend Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Run type check
working-directory: frontend
run: npm run type-check
- name: Run tests with coverage
working-directory: frontend
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: frontend/coverage/coverage-final.json
flags: frontend
name: frontend-coverage
frontend-lint:
name: Frontend Linting
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Run ESLint
working-directory: frontend
run: npm run lint || echo "⚠️ ESLint issues found (non-blocking)"
continue-on-error: true
- name: Run Prettier check
working-directory: frontend
run: npx prettier --check "src/**/*.{js,jsx,ts,tsx,css,md}" || echo "⚠️ Prettier issues found (non-blocking)"
continue-on-error: true
build-docker:
name: Build Docker Images
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [backend-test, backend-lint, frontend-test, frontend-lint]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push backend image
uses: docker/build-push-action@v5
with:
context: ./backend
push: true
tags: |
ghcr.io/${{ github.repository }}/backend:latest
ghcr.io/${{ github.repository }}/backend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push frontend image
uses: docker/build-push-action@v5
with:
context: ./frontend
push: true
tags: |
ghcr.io/${{ github.repository }}/frontend:latest
ghcr.io/${{ github.repository }}/frontend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max