Switched to basic python containers running on alpine, onto which the ci steps simply install poetry. Switching to nox for test automation across multiple python versions.
This commit is contained in:
parent
860bb1b01c
commit
ed624d00b4
4 changed files with 35 additions and 17 deletions
|
@ -1,34 +1,42 @@
|
||||||
# branches: main
|
# branches: main
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
unit_tests:
|
|
||||||
image: mquade/poetry:3.9-1.1.11
|
|
||||||
commands:
|
|
||||||
- poetry config virtualenvs.create false
|
|
||||||
- poetry install
|
|
||||||
- pytest
|
|
||||||
|
|
||||||
code_lint:
|
code_lint:
|
||||||
image: mquade/poetry:3.9-1.1.11
|
image: python
|
||||||
commands:
|
commands:
|
||||||
- poetry config virtualenvs.create false
|
- pip install poetry
|
||||||
- poetry install
|
- poetry install
|
||||||
- pip install black
|
- pip install black
|
||||||
- black .
|
- echo "----------------- running lint ------------------"
|
||||||
|
- python --version && poetry --version && black --version
|
||||||
|
- poetry run black .
|
||||||
|
|
||||||
|
unit_tests:
|
||||||
|
image: thekevjames/nox
|
||||||
|
commands:
|
||||||
|
- pip install poetry
|
||||||
|
- poetry install
|
||||||
|
- echo "----------------- running tests ------------------"
|
||||||
|
- python --version && poetry --version && nox --version
|
||||||
|
- poetry run nox
|
||||||
|
|
||||||
static_analysis:
|
static_analysis:
|
||||||
image: mquade/poetry:3.9-1.1.11
|
image: python
|
||||||
commands:
|
commands:
|
||||||
- poetry config virtualenvs.create false
|
- pip install poetry
|
||||||
- poetry install
|
- poetry install
|
||||||
- pip install mypy
|
- pip install mypy
|
||||||
- mypy .
|
- echo "----------------- running analysis ------------------"
|
||||||
|
- python --version && poetry --version && mypy --version
|
||||||
|
- poetry run mypy .
|
||||||
|
|
||||||
build_dist:
|
build_dist:
|
||||||
image: mquade/poetry:3.9-1.1.11
|
image: python
|
||||||
commands:
|
commands:
|
||||||
- poetry config virtualenvs.create false
|
- pip install poetry
|
||||||
- poetry install
|
- poetry install
|
||||||
|
- echo "----------------- running analysis ------------------"
|
||||||
|
- python --version && poetry --version
|
||||||
- poetry build
|
- poetry build
|
||||||
when:
|
when:
|
||||||
branch: main
|
branch: main
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import nox # type: ignore
|
import nox
|
||||||
|
|
||||||
|
|
||||||
@nox.session(python=["3.7", "3.8", "3.9"])
|
@nox.session(python=["3.7", "3.8", "3.9"])
|
||||||
|
|
|
@ -38,3 +38,13 @@ show_missing = true
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.0.0"]
|
requires = ["poetry-core>=1.0.0"]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = [
|
||||||
|
"click",
|
||||||
|
"pytest",
|
||||||
|
"nox",
|
||||||
|
"importlib-metadata"
|
||||||
|
]
|
||||||
|
ignore_missing_imports = true
|
||||||
|
|
|
@ -4,6 +4,6 @@ import sys
|
||||||
try:
|
try:
|
||||||
from importlib.metadata import version as metadata_version
|
from importlib.metadata import version as metadata_version
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from importlib_metadata import version as metadata_version # type: ignore
|
from importlib_metadata import version as metadata_version
|
||||||
|
|
||||||
__version__ = str(metadata_version(__name__))
|
__version__ = str(metadata_version(__name__))
|
||||||
|
|
Loading…
Reference in a new issue