Skip to content

Commit

Permalink
update port in pipeline.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CarduCaldeira committed Jun 2, 2024
1 parent 8f8a89d commit e164793
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
postgres:
image: postgres:latest
ports:
- 5432:5432
- ${{ secrets.DB_PORT }}:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Wait for PostgreSQL to be ready
run: |
until pg_isready -h localhost -p 5432; do
until pg_isready -h localhost -p ${{ secrets.DB_PORT }}; do
echo "Waiting for PostgreSQL to be ready..."
sleep 1
done
Expand All @@ -46,7 +46,7 @@ jobs:
env:
PGPASSWORD: ${{ secrets.DB_PASSWORD }}
run: |
psql -h localhost -U ${{ secrets.DB_USER }} -d ${{ secrets.DB_NAME }} -p 5432 -f data/start.sql
psql -h localhost -U ${{ secrets.DB_USER }} -d ${{ secrets.DB_NAME }} -p ${{ secrets.DB_PORT }} -f data/start.sql
- name: Python test
env:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Para gerar a documentação automatica baseada nas docstrings, insira em docs/so
```
Isso automantiacamente gerara uma documentação com as docstrings do modulo source/db.py

A documentação gerada pelo mkdocs pode ver visualizada em https://carducaldeira.github.io/template-python-postgres/.

## PYTEST e BANDIT

No modulo tests/conftest.py são definidas as fixtures (funções de inicialização e encerramento de contexto para os testes). Como exemplo é testado a conexão com o banco de dados. O script test_app.py é adicionado como exemplo de uso do parametrize.
Expand Down

0 comments on commit e164793

Please sign in to comment.