Skip to content

Commit

Permalink
Workflow postgres test
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalRu committed Sep 22, 2023
1 parent 4fce1e9 commit df9f758
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ on:
jobs:
tests:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:13.10
env:
POSTGRES_USER: django_user
POSTGRES_PASSWORD: django_password
POSTGRES_DB: django_db
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:

- name: Check out code
uses: actions/checkout@v3

Expand All @@ -25,4 +36,10 @@ jobs:
pip install flake8==6.1.0 flake8-isort==6.1.0
- name: Test with flake8
env:
POSTGRES_USER: django_user
POSTGRES_PASSWORD: django_password
POSTGRES_DB: django_db
DB_HOST: 127.0.0.1
DB_PORT: 5432
run: python -m flake8 backend/

0 comments on commit df9f758

Please sign in to comment.