Skip to content

Commit

Permalink
ci: add testing
Browse files Browse the repository at this point in the history
  • Loading branch information
toadharvard committed Oct 26, 2023
1 parent df56d8c commit 0ca3a25
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Check
name: Basics checks for code quality
on:
pull_request:
branches:
- main
push:

jobs:
lint:
runs-on: ubuntu-latest
Expand All @@ -21,4 +20,7 @@ jobs:
run: python3 -m pip install poetry && make init

- name: Run all linters and formatters
run: make lint
run: make lint

- name: Run all tests and count coverage
run: make test
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ run:
all:
make init run

## Run all formatters and linters in project
lint:
poetry run ruff ./tests ./app
poetry run ruff format --check ./tests ./app
poetry run black --check ./tests ./app
poetry run mypy --ignore-missing-imports ./app
poetry run ruff ./tests/*.py ./app/*.py
poetry run ruff format --check ./tests/*.py ./app/*.py
poetry run black --check ./tests/*.py ./app/*.py
poetry run mypy --ignore-missing-imports ./app/*.py
## Run all tests in project
test:
poetry run pytest --verbosity=2 --showlocals -log-level=DEBUG --cov=app --cov-report term

.DEFAULT_GOAL := help
# See <https://gist.github.com/klmr/575726c7e05d8780505a> for explanation.
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ black = "^23.10.1"
pre-commit = "^3.5.0"
celery-types = "^0.20.0"
watchdog = "^3.0.0"
pytest-cov = "^4.1.0"

[build-system]
requires = ["poetry-core"]
Expand Down
2 changes: 2 additions & 0 deletions tests/test_dummy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_true_is_true():
assert True is True

0 comments on commit 0ca3a25

Please sign in to comment.