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