-
Notifications
You must be signed in to change notification settings - Fork 10
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
142 additions
and
0 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,8 @@ | ||
coverage: | ||
status: | ||
patch: | ||
default: | ||
target: '100' | ||
project: | ||
default: | ||
target: '88' |
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,7 @@ | ||
[run] | ||
source = | ||
smithy_python | ||
|
||
[report] | ||
exclude_lines = | ||
raise NotImplementedError |
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,40 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: develop | ||
pull_request: | ||
branches: develop | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v1 | ||
- name: Set Up Python - ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install tox | ||
run: | | ||
python${{ matrix.python-version }} -m pip install --upgrade tox | ||
- name: Run tests | ||
run: | | ||
tox -e py | ||
- name: Upload coverage | ||
if: matrix.python-version == 3.7 | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
flags: unittests | ||
name: codecov-umbrella | ||
yml: ./codecov.yml | ||
fail_ci_if_error: true |
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,25 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: develop | ||
pull_request: | ||
branches: develop | ||
|
||
jobs: | ||
black-and-flake8: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v1 | ||
- name: Set Up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install tox | ||
run: | | ||
python3.7 -m pip install tox | ||
- name: Run linting | ||
run: | | ||
tox -e lint |
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,25 @@ | ||
name: Type Check | ||
|
||
on: | ||
push: | ||
branches: develop | ||
pull_request: | ||
branches: develop | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v1 | ||
- name: Set Up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install tox | ||
run: | | ||
python3.7 -m pip install tox | ||
- name: Run type checks | ||
run: | | ||
tox -e type |
Empty file.
Empty file.
Empty file.
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,6 @@ | ||
import smithy_python | ||
|
||
|
||
def test_version(): | ||
# TODO: Remove me when there's a real test | ||
assert isinstance(smithy_python.__version__, str) |
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,31 @@ | ||
[tox] | ||
envlist = py36,py37,py38 | ||
|
||
skipsdist = True | ||
|
||
[testenv] | ||
deps = | ||
-r requirements-dev.txt | ||
-e . | ||
commands = | ||
pytest --cov-config=.coveragerc --cov=./ --cov-report=xml tests/functional tests/unit | ||
|
||
[testenv:lint] | ||
deps = | ||
-r requirements-dev.txt | ||
commands = | ||
black --check --diff smithy_python tests | ||
flake8 smithy_python | ||
|
||
[testenv:type] | ||
deps = | ||
-r requirements-dev.txt | ||
commands = | ||
mypy smithy_python --strict | ||
|
||
[testenv:full_tests] | ||
deps = | ||
-r requirements-dev.txt | ||
-e . | ||
commands = | ||
pytest --cov-config=.coveragerc --cov=./ --cov-report=xml tests |