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
25 changes: 25 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Testes Automatizados

on: pull_request

jobs:
vitest:
name: Vitest Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: "package.json"

- name: Install dependencies
run: npm ci

- name: Setup CI Environment
run: |
touch .env
echo "DATABASE_URL=postgresql://local_user:local_password@localhost:5432/local_db?schema=public" >> .env

- name: Run Infrastructure & Tests
run: npm test
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# API-REST-Node.js-TypeScript

- API node.js para manipulação de tarefas com cobertura de 100% de testes automatizados.

## 🚀 Tecnologias

### Principais
Expand All @@ -17,6 +19,11 @@
- **CORS** (controle de acesso entre dominios)
- **Docker** (com PostgreSQL para desenvolvimento local)

### Testes Automatizados

- **Vitest** (criação dos testes)
- **Faker-js** (Mock de dados)

---

## 🗂️ Estrutura de Entidades
Expand All @@ -27,13 +34,14 @@
- `name`
- `email` (único)
- `password` (hash)
- `createdAt`
- `updatedAt`
- `created_at`
- `updated_at`

### UserSession

- `id` (uuid)
- `user_id`
- `created_at`
- `expires_at`
- `last_active_at`

Expand All @@ -44,8 +52,8 @@
- `description`
- `status` (`TaskStatus`)
- `userId` (`FK → User`)
- `createdAt`
- `updatedAt`
- `created_at`
- `updated_at`

### Enums

Expand Down
Loading
Loading