Skip to content

chore: remove setup.py #56

chore: remove setup.py

chore: remove setup.py #56

Workflow file for this run

---
name: testing
on:
push:
pull_request:
jobs:
#####################################################
# [START] on-push Release Gate Tests [PLEASE EDIT!] #
#####################################################
build:
name: Build, Lint, and Test with Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
django-version: ["3.2", "4.0", "4.1", "4.2"]
env:
DJANGO_SETTINGS_MODULE: settings.postgres
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dynamic_models
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Cache Dependencies
id: cache
uses: actions/cache@v3
with:
path: .venv
key: poetry-venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install -n --no-ansi
- name: Install Django
run: pip install Django==${{ matrix.django-version }}
- name: Lint
env:
DATABASE_NAME: dynamic_models
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
run: |
poetry run python ./manage.py makemigrations --check
poetry run black --check .
poetry run isort --check .
poetry run flake8
- name: Test
env:
DATABASE_NAME: dynamic_models
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
run: poetry run pytest