Add redis #7
This file contains 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: Hakaton Team 14 Workflow (main) | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
backend_tests: | |
name: Run tests for backend | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13.10 | |
env: | |
POSTGRES_USER: test_user | |
POSTGRES_PASSWORD: test_password | |
POSTGRES_DB: test_db | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Clone project to runner | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
cd hakaton && | |
python -m pip install --upgrade pip && | |
pip install -r requirements.txt | |
- name: Run flake8 tests | |
run: python -m flake8 | |
- name: Run Pytest | |
run: | | |
cd hakaton && | |
cp .env.example .env && | |
python manage.py makemigrations && | |
pytest |