From acc79a1d3cb61ca88198afb6ad8edf5e03a3b8f1 Mon Sep 17 00:00:00 2001 From: toanhoang Date: Wed, 19 Aug 2026 22:07:42 -0400 Subject: [PATCH] chore: add Gitea Actions CI workflow npm ci -> prisma generate -> tsc --noEmit -> lint -> test (Postgres service) -> build, on every push/PR. Requires a self-hosted act_runner registered to git.toanhoang.work (set up 2026-08-20, see /opt/homelab/gitea-runner/ on homelab01 -- outside this repo). No auto-deploy yet, still manual on appsrv01. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/ci.yml | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..c15f6f3 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: ["**"] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + services: + db: + image: postgres:16-alpine + env: + POSTGRES_USER: asset_license_mgmt + POSTGRES_PASSWORD: change-me-local-dev + POSTGRES_DB: asset_license_mgmt + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 5s + --health-timeout 5s + --health-retries 10 + + env: + DATABASE_URL: postgres://asset_license_mgmt:change-me-local-dev@localhost:5432/asset_license_mgmt + AUTH_SECRET: ci-only-dummy-secret-not-used-in-prod + AUTH_TRUST_HOST: "true" + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - run: npm ci + + - run: npx prisma generate + + - run: npx tsc --noEmit + + - run: npm run lint + + - run: npm test + + - run: npm run build