Skip to content

chore: add tests

chore: add tests #146

Workflow file for this run

name: Testes Unitarios
on: [push, pull_request]
env:
POSTGRES_USER: ${{vars.POSTGRES_USER}}
POSTGRES_PASSWORD: ${{vars.POSTGRES_PASSWORD}}
POSTGRES_HOST: ${{vars.POSTGRES_HOST}}
POSTGRES_PORT: ${{vars.POSTGRES_PORT}}
POSTGRES_DATABASE: ${{vars.POSTGRES_DATABASE}}
JWT_SECRET: ${{secrets.JWT_SECRET}}
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Verificação do Repositorio
uses: actions/[email protected]
- name: Iniciando Docker Compose
uses: hoverkraft-tech/[email protected]
with:
services: database
compose-file: ./docker-compose.yml
- name: Configurando Node.Js
uses: actions/[email protected]
with:
node-version: '20'
- name: Instalando Dependencias
run: npm clean-install
- name: Executando Testes
run: npm run test
env:
POSTGRES_HOST: ${{env.POSTGRES_HOST}}
POSTGRES_PORT: ${{env.POSTGRES_PORT}}
POSTGRES_USER: ${{env.POSTGRES_USER}}
POSTGRES_PASSWORD: ${{env.POSTGRES_PASSWORD}}
POSTGRES_DATABASE: ${{env.POSTGRES_DATABASE}}
JWT_SECRET: ${{env.JWT_SECRET}}