mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
90 lines
2.0 KiB
YAML
90 lines
2.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
frontend-build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '25'
|
|
cache: 'npm'
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install Dependencies
|
|
run: npm install
|
|
working-directory: frontend
|
|
|
|
- name: Typecheck
|
|
run: npm run typecheck
|
|
working-directory: frontend
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
working-directory: frontend
|
|
|
|
- name: Format Check
|
|
run: npm run format:check
|
|
working-directory: frontend
|
|
|
|
- name: Test
|
|
run: npm test -- --run
|
|
working-directory: frontend
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
working-directory: frontend
|
|
|
|
backend-check:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-latest
|
|
env:
|
|
SECRET_KEY: "ci-test-key"
|
|
DEBUG: "false"
|
|
ALLOWED_HOSTS: "localhost"
|
|
DJANGO_SETTINGS_MODULE: holy_backend.settings.dev
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.14.3'
|
|
cache: 'pip'
|
|
cache-dependency-path: backend/requirements-dev.txt
|
|
|
|
- name: Install Dependencies
|
|
run: pip install -r requirements-dev.txt
|
|
working-directory: backend
|
|
|
|
- name: Ruff Lint
|
|
run: ruff check .
|
|
working-directory: backend
|
|
|
|
- name: Ruff Format Check
|
|
run: ruff format --check .
|
|
working-directory: backend
|
|
|
|
- name: Django System Check
|
|
run: python manage.py check
|
|
working-directory: backend
|
|
|
|
- name: Check Migrations
|
|
run: python manage.py makemigrations --check --dry-run
|
|
working-directory: backend
|
|
|
|
- name: Run Tests
|
|
run: pytest
|
|
working-directory: backend
|