Skip to content

Commit

Permalink
🧱 ci: add workflow to test postgres database containerization
Browse files Browse the repository at this point in the history
  • Loading branch information
R-enanVieira committed Dec 13, 2024
1 parent 8d743d8 commit f47c6c5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI Pipeline for Database

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Checkout código
uses: actions/checkout@v3

- name: Configurar variáveis de ambiente
run: cp .env.template .env

- name: Subir banco com Docker Compose
run: docker compose up -d

- name: Aguardar PostgreSQL estar pronto
run: |
until docker exec unimancer_postgres pg_isready -U postgres; do
echo "Aguardando PostgreSQL iniciar..."
sleep 2
done
- name: Testar conexão com banco
run: docker exec unimancer_postgres psql -U postgres -d postgres -c '\l'

0 comments on commit f47c6c5

Please sign in to comment.