Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
pull_request:
push:
branches: [master, develop]

Copilot AI Mar 20, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O workflow roda em push apenas para branches [master, develop], mas o repositório parece usar 'main' como branch base (vide diffs). Isso faz com que pushes diretos em main não executem o CI. Sugestão: incluir 'main' na lista (ou ajustar para o branch padrão real) para garantir validação em push.

Suggested change
branches: [master, develop]
branches: [main, master, develop]

Copilot uses AI. Check for mistakes.

jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- 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: Testes backend
run: npm test

- name: Instalar dependencias (frontend)
run: npm ci --prefix frontend

- name: Lint frontend
run: npm run lint --prefix frontend

- name: Build frontend
run: npm run build --prefix frontend
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,30 @@ Bot de automacao para buscar vagas no LinkedIn com foco em Brasil remoto e expor
- `src/linkedinScraper.js`: coleta HTTP, paginacao e extracao das vagas
- `src/exporter.js`: geracao de Excel e PDF
- `src/logger.js`: logs padronizados
- `src/jobsApiApp.js`: monta as rotas da API Express (reutilizado nos testes)
- `src/server.js`: entrypoint da API (`dotenv` + listen)
- `test/`: testes automatizados (Vitest)

## Testes e CI (validar antes do PR)

O workflow [`.github/workflows/ci.yml`](.github/workflows/ci.yml) roda testes do backend, lint e build do frontend em PRs e em push para `master` e `develop`. No GitHub, ative *branch protection* com o check **CI / validate** obrigatorio se quiser bloquear merge com falha.

**Com dependencias ja instaladas** (raiz + `frontend`):

```bash
npm run validate
```

**Espelho do que o CI faz** (reinstala com `npm ci` na raiz e no frontend — mais lento, util antes de abrir PR):

```bash
npm run validate:ci
```

Outros comandos:

- `npm test` — apenas testes (Vitest)
- `npm run test:watch` — Vitest em modo observacao

## Requisitos

Expand Down Expand Up @@ -187,8 +211,8 @@ Todas sao opcionais.
- `WAIT_BETWEEN_SEARCHES_MS` (padrao: `5000`)
- `PAGE_TIMEOUT_MS` (padrao: `10000`)
- `MAX_PAGES_PER_KEYWORD` (padrao: `5`)
- `OUTPUT_FILE` (padrao: `vagas_linkedin.xlsx`)
- `PDF_FILE` (padrao: `vagas_linkedin.pdf`)
- `OUTPUT_FILE` (padrao: `output/vagas_linkedin.xlsx`)
- `PDF_FILE` (padrao: `output/vagas_linkedin.pdf`)
- `SEARCH_LOCATION` (padrao: `Brasil`)
- `SEARCH_GEO_ID` (padrao: `106057199`)
- `SEARCH_LANGUAGE` (padrao: `pt`)
Expand All @@ -212,10 +236,10 @@ set SEARCH_KEYWORDS=UX Designer,UI Designer,Product Manager,Product Owner&& npm

## Saida

Arquivos gerados por padrao:
Arquivos gerados por padrao (pasta `output/`):

- `vagas_linkedin.xlsx`
- `vagas_linkedin.pdf`
- `output/vagas_linkedin.xlsx`
- `output/vagas_linkedin.pdf`

Colunas exportadas:

Expand Down
Loading
Loading