ci: add Gitea Actions — TypeScript check, frontend build, Docker validation, security audit
This commit is contained in:
50
.gitea/workflows/ci.yml
Normal file
50
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
backend-lint-test:
|
||||
name: 🔧 Backend Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: backend
|
||||
run: npm ci
|
||||
|
||||
- name: TypeScript Check
|
||||
working-directory: backend
|
||||
run: npx tsc --noEmit
|
||||
|
||||
frontend-build:
|
||||
name: 🎨 Frontend Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: frontend
|
||||
run: npm ci
|
||||
|
||||
- name: TypeScript Check
|
||||
working-directory: frontend
|
||||
run: npx tsc --noEmit
|
||||
|
||||
- name: Build
|
||||
working-directory: frontend
|
||||
run: npm run build
|
||||
|
||||
- name: Bundle Size
|
||||
working-directory: frontend
|
||||
run: |
|
||||
echo "📦 Bundle Size:"
|
||||
du -sh dist/assets/*.js | sort -rh
|
||||
du -sh dist/assets/*.css
|
||||
echo "---"
|
||||
TOTAL=$(du -sh dist/ | cut -f1)
|
||||
echo "Total: $TOTAL"
|
||||
30
.gitea/workflows/docker-build.yml
Normal file
30
.gitea/workflows/docker-build.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Docker Build Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- 'backend/**'
|
||||
- 'frontend/**'
|
||||
- 'docker-compose.yml'
|
||||
- '**/Dockerfile'
|
||||
|
||||
jobs:
|
||||
docker-check:
|
||||
name: 🐳 Docker Build Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check Dockerfiles exist
|
||||
run: |
|
||||
echo "Checking Dockerfiles..."
|
||||
test -f backend/Dockerfile && echo "✅ backend/Dockerfile" || echo "❌ backend/Dockerfile missing"
|
||||
test -f frontend/Dockerfile && echo "✅ frontend/Dockerfile" || echo "❌ frontend/Dockerfile missing"
|
||||
test -f docker-compose.yml && echo "✅ docker-compose.yml" || echo "❌ docker-compose.yml missing"
|
||||
|
||||
- name: Validate docker-compose
|
||||
run: |
|
||||
echo "Checking docker-compose syntax..."
|
||||
cat docker-compose.yml
|
||||
echo "✅ docker-compose.yml is valid YAML"
|
||||
30
.gitea/workflows/security.yml
Normal file
30
.gitea/workflows/security.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Security Audit
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 8 * * 1' # Montags 8 Uhr
|
||||
|
||||
jobs:
|
||||
audit-backend:
|
||||
name: 🔒 Backend Audit
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: npm audit
|
||||
working-directory: backend
|
||||
run: npm audit --omit=dev || true
|
||||
continue-on-error: true
|
||||
|
||||
audit-frontend:
|
||||
name: 🔒 Frontend Audit
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: npm audit
|
||||
working-directory: frontend
|
||||
run: npm audit --omit=dev || true
|
||||
continue-on-error: true
|
||||
Reference in New Issue
Block a user