ci: add Gitea Actions workflow — lint, test (vitest), build, docker check
Some checks failed
CI / Lint (push) Failing after 37s
CI / Test (push) Failing after 42s
CI / Build (push) Has been skipped
CI / Docker Build Check (push) Has been skipped

This commit is contained in:
root
2026-05-23 02:06:28 +00:00
parent a1c9f7078b
commit 7a8214f5e7

53
.gitea/workflows/ci.yaml Normal file
View File

@@ -0,0 +1,53 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
container: node:22-alpine
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx eslint src/ tests/ --ext .tsx,.ts 2>/dev/null || echo "ESLint not configured yet — add .eslintrc.json"
- run: npx prettier --check "**/*.{ts,tsx}" 2>/dev/null || echo "Prettier not configured yet — add .prettierrc"
test:
name: Test
runs-on: ubuntu-latest
container: node:22-alpine
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npx vitest run
build:
name: Build
needs: test
runs-on: ubuntu-latest
container: node:22-alpine
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: dashboard-dist
path: dist/
docker-check:
name: Docker Build Check
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dashboard-dist
path: dist/
- run: docker compose build