habitmove/.woodpecker.yml

69 lines
1.7 KiB
YAML

# branches: main
pipeline:
code_lint:
image: python
commands:
- curl -sSL https://install.python-poetry.org | python3 -
- poetry install
- pip install black
- echo "----------------- running lint ------------------"
- python --version && poetry --version && black --version
- black .
unit_tests:
image: thekevjames/nox
commands:
- curl -sSL https://install.python-poetry.org | python3 -
- poetry install
- echo "----------------- running tests ------------------"
- python --version && poetry --version && nox --version
- nox
static_analysis:
image: python
commands:
- curl -sSL https://install.python-poetry.org | python3 -
- poetry install
- pip install mypy
- echo "----------------- running analysis ------------------"
- python --version && poetry --version && mypy --version
- mypy .
build_dist:
image: python
commands:
- curl -sSL https://install.python-poetry.org | python3 -
- poetry install
- echo "----------------- running analysis ------------------"
- python --version && poetry --version
- poetry build
when:
branch: main
gitea_release:
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_release_token
base_url: https://git.martyoeh.me
files: dist/*
when:
branch: main
event: tag
tag: v*
notify_matrix:
image: plugins/matrix
settings:
homeserver: https://matrix.org
roomid:
from_secret: matrix_roomid
userid:
from_secret: matrix_userid
accesstoken:
from_secret: matrix_token
when:
status: [ success, failure ]