-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CI, lint, prepare 1.1.0 release (#16)
- Loading branch information
1 parent
2637486
commit e45490c
Showing
22 changed files
with
1,480 additions
and
1,173 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
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
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,41 +1,43 @@ | ||
.ONESHELL: | ||
.PHONY: $(MAKECMDGOALS) | ||
MAKEFLAGS += --no-print-directory | ||
## | ||
## 🚧 pysignalr developer tools | ||
## | ||
|
||
## | ||
SOURCE = src tests example.py example_with_token.py | ||
|
||
help: ## Show this help (default) | ||
@grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
||
all: ## Run a whole CI pipeline: formatters, linters, tests and docs | ||
make lint test docs | ||
install: ## Install dependencies | ||
poetry sync | ||
|
||
update: ## Update dependencies | ||
poetry update | ||
|
||
all: ## Run a whole CI pipeline: formatters, linters, tests | ||
make lint test | ||
|
||
lint: ## Lint with all tools | ||
make black ruff mypy | ||
|
||
test: ## Run test suite | ||
docker-compose up --build --exit-code-from test_runner test_runner || docker compose down | ||
|
||
docs: ## Generate documentation | ||
docker-compose run --rm docs sphinx-build -b html docs/source docs/build || docker compose down | ||
pytest --cov-report=term-missing --cov=pysignalr --cov-report=xml --asyncio-mode=auto -s -v tests | ||
|
||
## | ||
|
||
black: ## Format with black | ||
docker-compose run --rm formatter 'pip install black && black src tests example.py' || docker compose down | ||
black $(SOURCE) | ||
|
||
ruff: ## Lint with ruff | ||
docker-compose run --rm linter 'pip install ruff && ruff check --fix --unsafe-fixes src tests example.py' || docker compose down | ||
ruff check --fix --unsafe-fixes $(SOURCE) | ||
|
||
mypy: ## Lint with mypy | ||
docker-compose run --rm linter 'pip install mypy && mypy --strict src tests example.py' || docker compose down | ||
mypy --strict $(SOURCE) | ||
|
||
cover: ## Print coverage for the current branch | ||
docker-compose run --rm coverage 'pip install diff-cover && diff-cover --compare-branch `git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'` coverage.xml' || docker compose down | ||
diff-cover --compare-branch origin/master coverage.xml | ||
|
||
## | ||
|
||
clean: ## Remove all files from .gitignore except for `.venv` | ||
sudo git clean -xdf --exclude=".venv" | ||
git clean -xdf --exclude=".venv" |
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
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
Oops, something went wrong.