-
Notifications
You must be signed in to change notification settings - Fork 8
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
10 changed files
with
55 additions
and
90 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,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
charset = utf-8 | ||
|
||
[Makefile] | ||
indent_style = tab |
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 |
---|---|---|
|
@@ -14,14 +14,14 @@ jobs: | |
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
test-file: [dependencies, formatting, pytest, type_checking] | ||
test-section: [dependencies, formatting, pytest, type-checking] | ||
exclude: # See https://github.521000.bestmunity/t/improve-matrix-exclusion-feature/16340 | ||
- {test-file: dependencies, python-version: 3.6} | ||
- {test-file: dependencies, python-version: 3.7} | ||
- {test-file: dependencies, python-version: 3.8} | ||
- {test-file: formatting, python-version: 3.6} | ||
- {test-file: formatting, python-version: 3.7} | ||
- {test-file: formatting, python-version: 3.8} | ||
- {test-section: dependencies, python-version: 3.6} | ||
- {test-section: dependencies, python-version: 3.7} | ||
- {test-section: dependencies, python-version: 3.8} | ||
- {test-section: formatting, python-version: 3.6} | ||
- {test-section: formatting, python-version: 3.7} | ||
- {test-section: formatting, python-version: 3.8} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
|
@@ -30,17 +30,13 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
brew install shellcheck | ||
python -m pip install -U pip poetry | ||
poetry --version | ||
poetry install | ||
- name: ShellCheck | ||
run: | | ||
shellcheck scripts/*.sh | ||
- name: Test ${{ matrix.test-file }} | ||
run: bash ./scripts/tests/${{ matrix.test-file }}.sh | ||
- name: Test ${{ matrix.test-section }} | ||
run: make ${{ matrix.test-section }} | ||
- name: Upload coverage to Codecov | ||
if: matrix.test-file == 'pytest' | ||
if: matrix.test-section == 'pytest' | ||
uses: codecov/[email protected] | ||
with: | ||
file: ./coverage.xml | ||
|
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,30 @@ | ||
all: lint test | ||
|
||
lint: ## Runs black and isort | ||
poetry run $(MAKE) lint-poetry | ||
|
||
lint-poetry: | ||
python -m isort . | ||
python -m black . | ||
|
||
test: pytest type-checking formatting dependencies ## Runs all available tests (pytest, type checking, etc.) | ||
|
||
# TODO: LOCATION = checkdigit/ tests/ | ||
pytest: ## Runs pytest on docstrings and the tests folder and outputs coverage.xml | ||
poetry run python -m pytest --cov-report=xml:coverage.xml --cov=checkdigit --doctest-modules checkdigit/ tests/ | ||
|
||
type-checking: ## Runs mypy --strict | ||
poetry run python -m mypy --strict . | ||
|
||
dependencies: ## Verifies pyproject.toml file integrity | ||
poetry check | ||
poetry run python -m pip check | ||
|
||
formatting: ## Tests whether formatting meets standards | ||
poetry run $(MAKE) formatting-poetry | ||
|
||
formatting-poetry: | ||
python -m black --check . | ||
python -m isort --check-only . | ||
python -m pylint checkdigit | ||
python -m pydocstyle --convention=google |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.