Skip to content

feat(PAV-122): criar seed e documentar testes locais da API #544

feat(PAV-122): criar seed e documentar testes locais da API

feat(PAV-122): criar seed e documentar testes locais da API #544

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [master, develop]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: package-lock.json
- name: Instalar dependencias (raiz)
run: npm ci
- name: Validar mensagens de commit (commitlint)
# Backstop server-side: o hook local commit-msg pode ser pulado com `git commit --no-verify`,
# então o CI revalida todos os commits do PR antes de liberar o merge.
# Roda só em pull_request: commits de push para master/develop já chegaram via squash-merge
# do GitHub, cuja mensagem é o título do PR (padrão "[PAV-XXX] [Categoria] descrição",
# ver GUIA-LINEAR-GITHUB.md) — um formato diferente e fora do controle de quem contribui.
if: github.event_name == 'pull_request'
run: npx commitlint --from "${{ github.event.pull_request.base.sha }}" --to "${{ github.event.pull_request.head.sha }}" --verbose
- name: Workaround npm optional deps (rollup linux)
run: npm i --no-save --workspace=frontend @rollup/rollup-linux-x64-gnu
- name: Coverage frontend
run: npm run test:coverage --workspace=frontend
- name: Coverage backend
run: npm run test:coverage --workspace=backend
- name: Lint frontend
run: npm run lint --workspace=frontend
- name: Build frontend
run: npm run build --workspace=frontend