2022-08-25 00:56:49 +01:00
|
|
|
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
|
2022-08-25 00:59:59 +01:00
|
|
|
steps:
|
2022-08-25 00:56:49 +01:00
|
|
|
- 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:
|
2022-08-25 01:01:45 +01:00
|
|
|
- main
|
2022-08-25 00:56:49 +01:00
|
|
|
settings:
|
|
|
|
username: jackhadrill
|
|
|
|
password:
|
|
|
|
from_secret: password
|
|
|
|
repository: https://git.jacknet.io/api/packages/jackhadrill/pypi
|
|
|
|
skip_build: true
|