# CI: every pull request and every push to main must pass these checks # (ADR 0014). The deploy pipeline (CD) lives in cd.yml and only runs on # main after this workflow's quality bar. # # Runner requirements: an act_runner with the `ubuntu-latest` label and # Docker access (see deploy/stages.md, issue #9). name: CI on: pull_request: push: branches: [main] jobs: checks: name: Lint, typecheck, test runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v4 - name: Set up pnpm uses: pnpm/action-setup@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm - name: Install dependencies run: pnpm install --frozen-lockfile # Build first: package type checks resolve @dorfteich/shared through # its built dist, and i18n:check imports the built helpers. - name: Build all packages run: pnpm build - name: Lint (ESLint + Prettier) run: pnpm lint - name: Typecheck run: pnpm typecheck - name: Unit and integration tests run: pnpm test - name: Translation key parity (de/en) run: pnpm i18n:check images: name: Build container images # PR-only: on main the CD workflow builds and pushes the same images — # building twice would waste the runner (ADR 0014: build once, promote). if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v4 # PRs prove the Dockerfiles still build; pushing happens in cd.yml. - name: Build web image run: docker build -f apps/web/Dockerfile --build-arg APP_VERSION=${{ github.sha }} -t dorfteich-web:ci . - name: Build api image run: docker build -f apps/api/Dockerfile --build-arg APP_VERSION=${{ github.sha }} -t dorfteich-api:ci .