Skip to content

Commit 964f57c

Browse files
authored
Merge pull request #7 from Benevanio/develop
Develop
2 parents 60d8eb2 + b27f82b commit 964f57c

11 files changed

Lines changed: 2055 additions & 123 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master, develop]
7+
8+
jobs:
9+
validate:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: "22"
17+
cache: npm
18+
cache-dependency-path: package-lock.json
19+
20+
- name: Instalar dependencias (raiz)
21+
run: npm ci
22+
23+
- name: Testes backend
24+
run: npm test
25+
26+
- name: Instalar dependencias (frontend)
27+
run: npm ci --prefix frontend
28+
29+
- name: Lint frontend
30+
run: npm run lint --prefix frontend
31+
32+
- name: Build frontend
33+
run: npm run build --prefix frontend

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,30 @@ Bot de automacao para buscar vagas no LinkedIn com foco em Brasil remoto e expor
1818
- `src/linkedinScraper.js`: coleta HTTP, paginacao e extracao das vagas
1919
- `src/exporter.js`: geracao de Excel e PDF
2020
- `src/logger.js`: logs padronizados
21+
- `src/jobsApiApp.js`: monta as rotas da API Express (reutilizado nos testes)
22+
- `src/server.js`: entrypoint da API (`dotenv` + listen)
23+
- `test/`: testes automatizados (Vitest)
24+
25+
## Testes e CI (validar antes do PR)
26+
27+
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.
28+
29+
**Com dependencias ja instaladas** (raiz + `frontend`):
30+
31+
```bash
32+
npm run validate
33+
```
34+
35+
**Espelho do que o CI faz** (reinstala com `npm ci` na raiz e no frontend — mais lento, util antes de abrir PR):
36+
37+
```bash
38+
npm run validate:ci
39+
```
40+
41+
Outros comandos:
42+
43+
- `npm test` — apenas testes (Vitest)
44+
- `npm run test:watch` — Vitest em modo observacao
2145

2246
## Requisitos
2347

@@ -187,8 +211,8 @@ Todas sao opcionais.
187211
- `WAIT_BETWEEN_SEARCHES_MS` (padrao: `5000`)
188212
- `PAGE_TIMEOUT_MS` (padrao: `10000`)
189213
- `MAX_PAGES_PER_KEYWORD` (padrao: `5`)
190-
- `OUTPUT_FILE` (padrao: `vagas_linkedin.xlsx`)
191-
- `PDF_FILE` (padrao: `vagas_linkedin.pdf`)
214+
- `OUTPUT_FILE` (padrao: `output/vagas_linkedin.xlsx`)
215+
- `PDF_FILE` (padrao: `output/vagas_linkedin.pdf`)
192216
- `SEARCH_LOCATION` (padrao: `Brasil`)
193217
- `SEARCH_GEO_ID` (padrao: `106057199`)
194218
- `SEARCH_LANGUAGE` (padrao: `pt`)
@@ -212,10 +236,10 @@ set SEARCH_KEYWORDS=UX Designer,UI Designer,Product Manager,Product Owner&& npm
212236

213237
## Saida
214238

215-
Arquivos gerados por padrao:
239+
Arquivos gerados por padrao (pasta `output/`):
216240

217-
- `vagas_linkedin.xlsx`
218-
- `vagas_linkedin.pdf`
241+
- `output/vagas_linkedin.xlsx`
242+
- `output/vagas_linkedin.pdf`
219243

220244
Colunas exportadas:
221245

0 commit comments

Comments
 (0)