-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
140 changed files
with
1,066 additions
and
706 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
VENV=cd testproject/django/src && ../venv/bin/python | ||
VENV=cd testproject/django && poetry run python src/manage.py | ||
|
||
test: bootstrap | ||
$(VENV) ./manage.py makemigrations --check | ||
$(VENV) ./manage.py startapp test_app | ||
$(VENV) makemigrations --check | ||
$(VENV) startapp test_app | ||
|
||
bootstrap: | ||
rm -Rf testproject | ||
mkdir -p testproject | ||
|
||
cd testproject && cookiecutter --no-input ../ | ||
|
||
coverage: | ||
$(VENV) -m pip install pytest-cov | ||
$(VENV) -m pytest --cov-report=xml --cov=app --cov=users --cov=a12n --cov=sepulkas | ||
$(VENV) -m pytest --cov-report=xml --cov=core --cov=users --cov=a12n --cov=sepulkas |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,10 @@ | ||
#!/bin/bash -e | ||
|
||
echo -ne "Running with " | ||
cp src/core/.env.ci src/core/.env | ||
|
||
python --version | ||
poetry install | ||
|
||
echo Creating and populating virtualenv.. | ||
poetry run python src/manage.py collectstatic | ||
poetry run python src/manage.py migrate | ||
|
||
python -m venv venv | ||
. venv/bin/activate | ||
|
||
pip install --upgrade pip pip-tools wheel | ||
make | ||
|
||
cd src | ||
|
||
echo Collecting static assets... | ||
./manage.py collectstatic | ||
|
||
echo Running initial migrations... | ||
./manage.py migrate | ||
|
||
cd ../ | ||
echo Apply formatting.. | ||
make fmt | ||
|
||
echo Running flake8.. | ||
make lint | ||
|
||
echo Running pytest... | ||
make test | ||
|
||
echo Done | ||
make fmt lint test |
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
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,21 @@ | ||
install-dev-deps: dev-deps | ||
pip-sync requirements.txt dev-requirements.txt | ||
|
||
install-deps: deps | ||
pip-sync requirements.txt | ||
|
||
deps: | ||
pip-compile --resolver=backtracking --output-file=requirements.txt pyproject.toml | ||
|
||
dev-deps: deps | ||
pip-compile --resolver=backtracking --extra=dev --output-file=dev-requirements.txt pyproject.toml | ||
manage = poetry run src/manage.py | ||
|
||
fmt: | ||
cd src && autoflake --in-place --remove-all-unused-imports --recursive . | ||
cd src && isort . | ||
cd src && black . | ||
poetry run autoflake --in-place --remove-all-unused-imports --recursive src tests | ||
poetry run black src tests | ||
|
||
lint: | ||
dotenv-linter src/app/.env.ci | ||
cd src && ./manage.py check | ||
flake8 src | ||
cd src && mypy | ||
$(manage) check | ||
poetry run flake8 src tests | ||
poetry run mypy src tests | ||
poetry run dotenv-linter src/core/.env.ci | ||
|
||
test: | ||
mkdir -p src/static | ||
cd src && ./manage.py makemigrations --dry-run --no-input --check | ||
cd src && ./manage.py compilemessages | ||
cd src && pytest --dead-fixtures | ||
cd src && pytest -x | ||
|
||
$(manage) makemigrations --dry-run --no-input --check | ||
$(manage) compilemessages | ||
poetry run pytest --dead-fixtures | ||
poetry run pytest -x | ||
|
||
pr: fmt lint test |
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
Oops, something went wrong.