Last active
April 28, 2024 19:29
-
-
Save sabderemane/bae142f8dab61c6aa6ce57f38eaa269e to your computer and use it in GitHub Desktop.
Full workflow of python with docker services (postgres), to run django tests
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: Test Workflow | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
image: postgres | |
env: | |
- POSTGRES_USER: postgres | |
- POSTGRES_PASSWORD: postgres | |
- POSTGRES_BD: postgres | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8.9 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8.9 | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run tests | |
run: python manage.py test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment