Skip to content

Instantly share code, notes, and snippets.

View sabderemane's full-sized avatar

Sarah Abderemane sabderemane

View GitHub Profile
@sabderemane
sabderemane / workflow_full_v2.yml
Last active April 28, 2024 19:29
Full workflow of python with docker services (postgres), to run django tests
name: Test Workflow
on: push
jobs:
test:
runs-on: ubuntu-latest
services:
image: postgres
ports:
- 5432:5432
on:
push:
- master
name: Test Workflow
on: push
jobs:
tests:
runs-on: ubuntu-latest
services:
image: postgres
services:
image: postgres
env:
- POSTGRES_USER: postgres
- POSTGRES_PASSWORD: postgres
- POSTGRES_BD: postgres
ports:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.5.7
- uses: actions/setup-python@v1
with:
python-version: 3.5.7
jobs:
job1:
job2:
need: job1