1
0
Fork 0
PythonProject/.drone.yml

50 lines
1.0 KiB
YAML
Raw Normal View History

2022-08-31 00:54:17 +01:00
kind: pipeline
type: docker
name: lint-test
steps:
- name: lint
image: python:3-slim
commands:
- echo "Installing lint dependencies..."
- pip install --no-cache-dir '.[lint]' > /dev/null
- echo "Running flake8..."
- flake8 src
- echo "Running pylint..."
- pylint src
- name: test
image: python:3-slim
commands:
- echo "Installing test dependencies..."
- pip install --no-cache-dir '.[test]' > /dev/null
- echo "Running tests..."
- pytest
---
kind: pipeline
type: docker
name: build-deploy
trigger:
branch:
- main
depends_on:
- lint-test
steps:
- name: build
image: python:3-slim
commands:
- pip install --no-cache-dir build
- python -m build --wheel
- name: publish
image: plugins/pypi
when:
branch:
- main
event:
- push
settings:
username:
from_secret: username
password:
from_secret: password
repository: https://git.jacknet.io/api/packages/jackhadrill/pypi
skip_build: true