container-spawner/.drone.yml

48 lines
1.0 KiB
YAML

kind: pipeline
type: docker
name: lint
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
---
kind: pipeline
type: docker
name: test
- 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
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:
- master
settings:
username: jackhadrill
password:
from_secret: password
repository: https://git.jacknet.io/api/packages/jackhadrill/pypi
skip_build: true