From 7a8214f5e71365fd765c38bf97f965bc37305bbc Mon Sep 17 00:00:00 2001 From: root Date: Sat, 23 May 2026 02:06:28 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20add=20Gitea=20Actions=20workflow=20?= =?UTF-8?q?=E2=80=94=20lint,=20test=20(vitest),=20build,=20docker=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .gitea/workflows/ci.yaml 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