Files
Charon/.github/workflows/ci.yml
Wikid82 a87b7cebb8 fix: replace Python tests with Go and React tests in CI
This is a Go + React project, not Python. Updated CI workflow to:
- Run Go tests (backend)
- Run frontend tests with npm (React)
- Remove Python test coverage requirement
2025-11-19 09:49:56 -05:00

73 lines
1.9 KiB
YAML

name: CI - Lint, Test & Coverage
on:
push:
branches: [ main, development, 'feature/**' ]
pull_request:
branches: [ main, development ]
jobs:
lint:
name: Lint (ruff & flake8)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Set up Python
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4
with:
python-version: '3.12'
- name: Cache pip
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
- name: Run pre-commit
run: |
pre-commit run --all-files
- name: Run ruff
run: |
ruff check .
- name: Run flake8
run: |
flake8 . || true
test-backend:
name: Backend Tests (Go)
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Run Go tests
working-directory: backend
run: |
go test -v ./...
test-frontend:
name: Frontend Tests (React)
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
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 frontend tests
working-directory: frontend
run: npm test