pipeline updated
This commit is contained in:
@@ -1,10 +1,33 @@
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
- event: pull_request
|
||||||
|
branch: main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: install-deps
|
||||||
image: debian
|
image: python:3.11-slim
|
||||||
commands:
|
commands:
|
||||||
- echo "This is the build step"
|
- pip install --upgrade pip
|
||||||
- echo "binary-data-123" > executable
|
- pip install flake8 black isort # можно добавить pylint, mypy и др.
|
||||||
|
|
||||||
|
- name: flake8
|
||||||
|
image: python:3.11-slim
|
||||||
|
commands:
|
||||||
|
- flake8 . --max-line-length=120 --exclude=.venv,venv,__pycache__
|
||||||
|
|
||||||
|
- name: black
|
||||||
|
image: python:3.11-slim
|
||||||
|
commands:
|
||||||
|
- black --check --diff .
|
||||||
|
|
||||||
|
- name: isort
|
||||||
|
image: python:3.11-slim
|
||||||
|
commands:
|
||||||
|
- isort --check-only --diff .
|
||||||
|
|
||||||
|
- name: mypy
|
||||||
|
image: python:3.11-slim
|
||||||
|
commands:
|
||||||
|
- pip install mypy
|
||||||
|
- mypy .
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
when:
|
when:
|
||||||
- event: push
|
- event: push
|
||||||
branch: main
|
branch: main
|
||||||
|
- event: pull_request
|
||||||
|
branch: main
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: install
|
||||||
image: debian
|
image: python:3.11-slim
|
||||||
commands:
|
commands:
|
||||||
- echo "This is the build step"
|
- pip install --upgrade pip
|
||||||
- echo "binary-data-123" > executable
|
- pip install pytest pytest-cov coverage
|
||||||
|
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
image: python:3.11-slim
|
||||||
|
commands:
|
||||||
|
- pytest --cov=src --cov-report=term --cov-report=xml tests/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user