Files
errors.bitreport.pt/.gitea/workflows/ci.yml
T
David Santos 0bd13bac5b feat(ci): implement Gitea Actions CI/CD pipeline
Add automated test, build, and validation pipeline:
- Test stages: npm test for ingest-api and api (Vitest)
- Lint/typecheck: admin-ui (Next.js ESLint + TypeScript)
- Docker build validation: validate all service containers
- Parallel jobs with Node 20, npm cache for fast iteration
- Documentation: docs/CI_PIPELINE.md with setup and troubleshooting

Addresses BIT-2498, BIT-2481 acceptance criteria for CI pipeline.

Paperclip-Agent: Patrícia Santos (urlKey patr-cia-santos; id 0f76874a-ad67-4a54-86f1-68a54dd1996f)
Paperclip-Issue: BIT-2498
2026-04-12 09:23:04 +00:00

95 lines
2.0 KiB
YAML

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test-ingest-api:
name: Test ingest-api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'ingest-api/package-lock.json'
- name: Install dependencies
working-directory: ingest-api
run: npm ci
- name: Run tests
working-directory: ingest-api
run: npm test
test-api:
name: Test api
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'api/package-lock.json'
- name: Install dependencies
working-directory: api
run: npm ci
- name: Run tests
working-directory: api
run: npm test
lint-admin-ui:
name: Lint and typecheck admin-ui
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'admin-ui/package-lock.json'
- name: Install dependencies
working-directory: admin-ui
run: npm ci
- name: Run linter
working-directory: admin-ui
run: npm run lint
- name: Type check
working-directory: admin-ui
run: npm run typecheck
docker-build:
name: Validate Docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker images
run: docker compose build
env:
ER_MYSQL_ROOT_PASSWORD: devrootchange
ER_MYSQL_USER: er_app
ER_MYSQL_PASSWORD: er_app_secret
ER_MYSQL_DATABASE: error_reporting