-
Notifications
You must be signed in to change notification settings - Fork 80
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
1 parent
567c4a5
commit db4ca17
Showing
4 changed files
with
66 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: build | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [3.6, 3.7, 3.8, 3.9] | ||
django: | ||
- 'django>=3.2.0, <3.3' | ||
- 'django>=3.1.0, <3.2' | ||
- 'django>=3.0.0, <3.1' | ||
- 'django>=2.2.0, <3.0' | ||
- 'django>=2.1.0, <2.2.0' | ||
- 'django>=2.0.0, <2.1.0' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Add pip bin to PATH | ||
run: | | ||
echo "/home/runner/.local/bin" >> $GITHUB_PATH | ||
- name: Install deps with ${{ matrix.python }} | ||
run: | | ||
pip install ".[test, ci]" | ||
pip install "${{ matrix.django }}" --upgrade | ||
# ignore for now | ||
# - name: Lint with ${{ matrix.python }} | ||
# if: ${{ matrix.python == '3.8' }} | ||
# run: make lint | ||
|
||
- name: Install, test and code coverage with ${{ matrix.python }} | ||
run: | | ||
python setup.py install | ||
make test |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
STREAM_KEY ?= NOT_EXIST | ||
STREAM_SECRET ?= NOT_EXIST | ||
|
||
.PHONY: help check test lint lint-fix | ||
|
||
help: ## Display this help message | ||
@echo "Please use \`make <target>\` where <target> is one of" | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; \ | ||
{printf "\033[36m%-40s\033[0m %s\n", $$1, $$2}' | ||
|
||
lint: ## Run linters | ||
black --check stream | ||
flake8 --ignore=E501,E225,W293,W503,F401 stream_django | ||
|
||
lint-fix: | ||
black stream_django | ||
|
||
test: ## Run tests | ||
STREAM_KEY=$(STREAM_KEY) STREAM_SECRET=$(STREAM_SECRET) python setup.py test | ||
|
||
check: lint test ## Run linters + tests |
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