Skip to content

Commit

Permalink
Merge ffc715b into 33a9408
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Mar 18, 2020
2 parents 33a9408 + ffc715b commit 9d1ca28
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/disl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: 'Build dockerfile'
- name: 'Build named dockerfile'
run: |
docker build . --tag wemake-services/docker-image-size-limit:latest
- uses: wemake-services/docker-image-size-limit@master
with:
with: # we lint this image by itself:
image: 'wemake-services/docker-image-size-limit:latest'
size: 405MB
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ install:
script:
- poetry run flake8 .
- poetry run mypy docker_image_size_limit
# We need this image for tests:
- poetry run docker pull python:3.6.6-alpine
- poetry run pytest
- poetry check
- poetry run pip check
Expand Down
4 changes: 2 additions & 2 deletions docker_image_size_limit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
try: # pragma: no cover
from importlib import metadata as importlib_metadata # noqa: WPS433
except ImportError: # pragma: no cover
import importlib_metadata # noqa: WPS433, WPS440
import importlib_metadata # type: ignore # noqa: WPS433, WPS440

#: We use this variable to show version spec.
_version = importlib_metadata.version(
_version = importlib_metadata.version( # type: ignore
os.path.basename(os.path.dirname(__file__)),
)

Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pytest = "^5.4"

mypy = "^0.770"
wemake-python-styleguide = "^0.13.4"
flake8-pytest-style = "^0.3.1"
flake8-pytest-style = "^0.5.0"
nitpick = "^0.21.4"

safety = "^1.8"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ strictness = long
# py.test options:
norecursedirs = *.egg .eggs dist build docs .tox .git __pycache__

timeout = 10
timeout = 15

filterwarnings =
ignore::DeprecationWarning
Expand Down
6 changes: 2 additions & 4 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ def test_main_overflow(docker_client, image_name, monkeypatch):
"""Checks size with binary limit."""
monkeypatch.setattr(sys, 'argv', ['', image_name, '1 MB'])
with pytest.raises(SystemExit) as exit_value:
main()
assert exit_value.value.code == 1
assert not main() and exit_value.value.code == 1


def test_main_correct(docker_client, image_name, monkeypatch):
"""Checks size with binary limit."""
monkeypatch.setattr(sys, 'argv', ['', image_name, '1 GB'])
with pytest.raises(SystemExit) as exit_value:
main()
assert exit_value.value.code == 0
assert not main() and exit_value.value.code == 0

0 comments on commit 9d1ca28

Please sign in to comment.