diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1815a13..98c4ad5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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/ \ No newline at end of file