diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..4bb5310 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -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