184 lines
3.1 KiB
YAML
184 lines
3.1 KiB
YAML
|
---
|
||
|
kind: pipeline
|
||
|
name: lint
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: flake8
|
||
|
image: python:3.8
|
||
|
commands:
|
||
|
- pip install -r dev-requirements.txt -qq
|
||
|
- flake8
|
||
|
environment:
|
||
|
PY_COLORS: 1
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/master
|
||
|
- refs/tags/**
|
||
|
- refs/pull/**
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
name: test
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: python35-pytest
|
||
|
image: python:3.5
|
||
|
commands:
|
||
|
- pip install -r dev-requirements.txt -qq
|
||
|
- pip install -r test/unit/requirements.txt -qq
|
||
|
- python -m pytest --cov --cov-append --no-cov-on-fail
|
||
|
environment:
|
||
|
PY_COLORS: 1
|
||
|
depends_on:
|
||
|
- clone
|
||
|
|
||
|
- name: python36-pytest
|
||
|
image: python:3.6
|
||
|
commands:
|
||
|
- pip install -r dev-requirements.txt -qq
|
||
|
- pip install -r test/unit/requirements.txt -qq
|
||
|
- python -m pytest --cov --cov-append --no-cov-on-fail
|
||
|
environment:
|
||
|
PY_COLORS: 1
|
||
|
depends_on:
|
||
|
- clone
|
||
|
|
||
|
- name: python37-pytest
|
||
|
image: python:3.7
|
||
|
commands:
|
||
|
- pip install -r dev-requirements.txt -qq
|
||
|
- pip install -r test/unit/requirements.txt -qq
|
||
|
- python -m pytest --cov --cov-append --no-cov-on-fail
|
||
|
environment:
|
||
|
PY_COLORS: 1
|
||
|
depends_on:
|
||
|
- clone
|
||
|
|
||
|
- name: python38-pytest
|
||
|
image: python:3.8
|
||
|
commands:
|
||
|
- pip install -r dev-requirements.txt -qq
|
||
|
- pip install -r test/unit/requirements.txt -qq
|
||
|
- python -m pytest --cov --cov-append --no-cov-on-fail
|
||
|
environment:
|
||
|
PY_COLORS: 1
|
||
|
depends_on:
|
||
|
- clone
|
||
|
|
||
|
- name: codecov
|
||
|
image: python:3.8
|
||
|
commands:
|
||
|
- pip install codecov -qq
|
||
|
- codecov --required -X gcov
|
||
|
environment:
|
||
|
CODECOV_TOKEN:
|
||
|
from_secret: codecov_token
|
||
|
PY_COLORS: 1
|
||
|
depends_on:
|
||
|
- python35-pytest
|
||
|
- python36-pytest
|
||
|
- python37-pytest
|
||
|
- python38-pytest
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/master
|
||
|
- refs/tags/**
|
||
|
- refs/pull/**
|
||
|
|
||
|
depends_on:
|
||
|
- lint
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
name: build
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: build
|
||
|
image: python:3.8
|
||
|
commands:
|
||
|
- pip install ansible -qq
|
||
|
- ansible-galaxy collection build --output-path dist/
|
||
|
|
||
|
- name: checksum
|
||
|
image: alpine
|
||
|
commands:
|
||
|
- cd dist/ && sha256sum * > ../sha256sum.txt
|
||
|
|
||
|
- name: publish-gitea
|
||
|
image: plugins/gitea-release
|
||
|
settings:
|
||
|
api_key:
|
||
|
from_secret: gitea_token
|
||
|
base_url: https://gitea.rknet.org
|
||
|
files:
|
||
|
- dist/*
|
||
|
- sha256sum.txt
|
||
|
note: CHANGELOG.md
|
||
|
overwrite: true
|
||
|
title: ${DRONE_TAG}
|
||
|
when:
|
||
|
ref:
|
||
|
- refs/tags/**
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/master
|
||
|
- refs/tags/**
|
||
|
- refs/pull/**
|
||
|
|
||
|
depends_on:
|
||
|
- security
|
||
|
|
||
|
---
|
||
|
kind: pipeline
|
||
|
name: notifications
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: matrix
|
||
|
image: plugins/matrix
|
||
|
settings:
|
||
|
homeserver:
|
||
|
from_secret: matrix_homeserver
|
||
|
password:
|
||
|
from_secret: matrix_password
|
||
|
roomid:
|
||
|
from_secret: matrix_roomid
|
||
|
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
|
||
|
username:
|
||
|
from_secret: matrix_username
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/master
|
||
|
- refs/tags/**
|
||
|
status:
|
||
|
- success
|
||
|
- failure
|
||
|
|
||
|
depends_on:
|
||
|
- docs
|
||
|
|
||
|
---
|
||
|
kind: signature
|
||
|
hmac: 4521a2c60992b46f1bf8ac0400420d6259c7de4fbd3dfec9ee59cacc8cde1ee4
|
||
|
|
||
|
...
|