Skip to content

Commit

Permalink
Fixed ORMAR.
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Kirilin <[email protected]>
  • Loading branch information
s3rius committed Jun 30, 2024
1 parent 22b147e commit 7dd1026
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,24 @@ name: Testing {{cookiecutter.project_name}}
on: push

jobs:
black:
lint:
strategy:
matrix:
cmd:
- black
- ruff
- mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install deps
uses: knowsuchagency/poetry-install@v1
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run black check
run: poetry run black --check .
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install deps
uses: knowsuchagency/poetry-install@v1
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run flake8 check
run: poetry run flake8 --count .
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.11'
- name: Install deps
uses: knowsuchagency/poetry-install@v1
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run mypy check
run: poetry run mypy .
run: poetry install
- name: Run lint check
run: poetry run pre-commit run -a {{ '${{' }} matrix.cmd {{ '}}' }}
pytest:
runs-on: ubuntu-latest
{%- if ((cookiecutter.db_info.name != "none" and cookiecutter.db_info.name != "sqlite") or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
nest_asyncio.apply()
{%- elif cookiecutter.orm == "ormar" %}
from sqlalchemy.engine import create_engine
from {{cookiecutter.project_name}}.db.config import database
from {{cookiecutter.project_name}}.db.base import database
from {{cookiecutter.project_name}}.db.utils import create_database, drop_database

{%- elif cookiecutter.orm == "psycopg" %}
Expand Down

0 comments on commit 7dd1026

Please sign in to comment.