mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
added gitea action for frontend build and backend check
This commit is contained in:
1 parent
83f46e6619
commit
2882d3956e
1 file changed
+60
@@ -0,0 +1,60 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
frontend-build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: frontend/package-lock.json
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
working-directory: frontend
|
||||
|
||||
- name: Build Frontend
|
||||
run: npm run build
|
||||
working-directory: frontend
|
||||
|
||||
backend-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
cache: 'pip'
|
||||
cache-dependency-path: backend/requirements.txt
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pip install -r requirements.txt
|
||||
working-directory: backend
|
||||
|
||||
- name: Django System Check
|
||||
run: python manage.py check
|
||||
working-directory: backend
|
||||
env:
|
||||
SECRET_KEY: "ci-test-key"
|
||||
DEBUG: "false"
|
||||
ALLOWED_HOSTS: "localhost"
|
||||
|
||||
- name: Check Migrations
|
||||
run: python manage.py makemigrations --check --dry-run
|
||||
working-directory: backend
|
||||
env:
|
||||
SECRET_KEY: "ci-test-key"
|
||||
DEBUG: "false"
|
||||
ALLOWED_HOSTS: "localhost"
|
||||
Reference in new issue
Block a user