test: test para validação de id #153
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |