Skip to content

Merge pull request #43 from fivan999/fixes #162

Merge pull request #43 from fivan999/fixes

Merge pull request #43 from fivan999/fixes #162

Workflow file for this run

name: Django CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
ALLOWED_HOSTS: 127.0.0.1
INTERNAL_IPS: 127.0.0.1
USER_IS_ACTIVE: False
DB_NAME: database
DB_USER: user
DB_PASS: password
DB_HOST: localhost
DB_PORT: 5432
LOGIN_ATTEMPS: 5
USE_SMTP: False
DATABASE_URL: postgres://user:password@localhost:5432/database
REDIS_HOST: localhost
REDIS_POST: 6379
REDIS_DB: 0
ELASTICSEARCH_HOST: 127.0.0.1
ELASTICSEARCH_PORT: 9200
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.10"]
services:
postgres:
image: postgres:15.0
env:
POSTGRES_DB: database
POSTGRES_USER: user
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.9
env:
discovery.type: single-node
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 9200:9200
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/base.txt
pip install -r requirements/test.txt
- name: Run Tests
run: |
cd brainforces
python manage.py test