Rewrite example model step to use real PostgreSQL with SQLAlchemy #35
This file contains hidden or 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: Run tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| - uses: snok/install-poetry@v1 | |
| - name: Configure git | |
| run: | | |
| git config --global user.email "me@example.com" | |
| git config --global user.name "My Name" | |
| - run: ./test.sh | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgrespass@localhost:5432/testdb | |
| - run: ./test.sh | |
| working-directory: flask | |
| - run: ./fastapi/test.sh | |
| env: | |
| DATABASE_URL: postgresql+asyncpg://postgres:postgrespass@localhost:5432/postgres | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_PASSWORD: postgrespass | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 |