Skip to content

fix(scripts): generate a ticket before taking recent-tickets screensh… #72

fix(scripts): generate a ticket before taking recent-tickets screensh…

fix(scripts): generate a ticket before taking recent-tickets screensh… #72

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
backend:
name: Backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: backend/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r backend/requirements.txt
pip install ruff pytest-cov pytest-asyncio
- name: Compile check
run: find backend/app -name '*.py' -print0 | xargs -0 python -m py_compile
- name: Lint with ruff
run: ruff check backend/
- name: Run tests with coverage
working-directory: backend
run: |
pytest --cov=app --cov-report=term-missing --cov-report=xml:coverage.xml --cov-fail-under=100 -v
- name: Coverage summary
if: always()
continue-on-error: true
working-directory: backend
run: |
echo "## 🧪 Backend Test Coverage" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
python -m coverage report --format=text >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
frontend:
name: Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node 22
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build
working-directory: frontend
run: npm run build
- name: Lint
working-directory: frontend
run: npm run lint
docker:
name: Docker (${{ matrix.service }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- service: backend
context: backend
file: backend/Dockerfile
- service: frontend
context: frontend
file: frontend/Dockerfile
steps:
- uses: actions/checkout@v4
- name: Build ${{ matrix.service }} image
run: docker build --no-cache -f ${{ matrix.file }} ${{ matrix.context }}