mirror of
https://github.com/thegeeklab/docker-tidy.git
synced 2024-11-21 19:50:40 +00:00
add testing and coverage
This commit is contained in:
parent
424f1c0e74
commit
5768351773
@ -72,6 +72,48 @@ local PipelineDeps = {
|
||||
};
|
||||
|
||||
local PipelineTest = {
|
||||
kind: 'pipeline',
|
||||
name: 'test',
|
||||
platform: {
|
||||
os: 'linux',
|
||||
arch: 'amd64',
|
||||
},
|
||||
steps: [
|
||||
{
|
||||
name: 'pytest',
|
||||
image: 'python:3.8',
|
||||
environment: {
|
||||
PY_COLORS: 1,
|
||||
},
|
||||
commands: [
|
||||
'pip install pipenv -qq',
|
||||
'pipenv --bare install --dev --keep-outdated',
|
||||
'pipenv run pytest dockertidy/tests/ --cov=dockertidy/ --no-cov-on-fail',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'codecov',
|
||||
image: 'python:3.8',
|
||||
environment: {
|
||||
PY_COLORS: 1,
|
||||
CODECOV_TOKEN: { from_secret: 'codecov_token' },
|
||||
},
|
||||
commands: [
|
||||
'pip install codecov',
|
||||
'coverage combine .tox/py*/.coverage',
|
||||
'codecov --required',
|
||||
],
|
||||
},
|
||||
],
|
||||
depends_on: [
|
||||
'dependencies',
|
||||
],
|
||||
trigger: {
|
||||
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
|
||||
},
|
||||
};
|
||||
|
||||
local PipelineVerify = {
|
||||
kind: 'pipeline',
|
||||
name: 'verify',
|
||||
platform: {
|
||||
@ -85,7 +127,7 @@ local PipelineTest = {
|
||||
PythonVersion(pyversion='3.8'),
|
||||
],
|
||||
depends_on: [
|
||||
'dependencies',
|
||||
'test',
|
||||
],
|
||||
trigger: {
|
||||
ref: ['refs/heads/master', 'refs/tags/**', 'refs/pull/**'],
|
||||
@ -368,6 +410,7 @@ local PipelineNotifications = {
|
||||
PipelineLint,
|
||||
PipelineDeps,
|
||||
PipelineTest,
|
||||
PipelineVerify,
|
||||
PipelineSecurity,
|
||||
PipelineBuildPackage,
|
||||
PipelineBuildContainer(arch='amd64'),
|
||||
|
42
.drone.yml
42
.drone.yml
@ -51,6 +51,44 @@ trigger:
|
||||
depends_on:
|
||||
- lint
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: test
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: pytest
|
||||
image: python:3.8
|
||||
commands:
|
||||
- pip install pipenv -qq
|
||||
- pipenv --bare install --dev --keep-outdated
|
||||
- pipenv run pytest dockertidy/tests/ --cov=dockertidy/ --no-cov-on-fail
|
||||
environment:
|
||||
PY_COLORS: 1
|
||||
|
||||
- name: codecov
|
||||
image: python:3.8
|
||||
commands:
|
||||
- pip install codecov
|
||||
- coverage combine .tox/py*/.coverage
|
||||
- codecov --required
|
||||
environment:
|
||||
CODECOV_TOKEN:
|
||||
from_secret: codecov_token
|
||||
PY_COLORS: 1
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- refs/tags/**
|
||||
- refs/pull/**
|
||||
|
||||
depends_on:
|
||||
- dependencies
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: verify
|
||||
@ -111,7 +149,7 @@ trigger:
|
||||
- refs/pull/**
|
||||
|
||||
depends_on:
|
||||
- dependencies
|
||||
- test
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@ -491,6 +529,6 @@ depends_on:
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: 7434a5205208c8f283d2985ede241d81c2fdd629f19032f550d5173449b0c74f
|
||||
hmac: 5fd3ca3dfa6f98b965f927a5b3ac5e9f59d0f871fe97d018bea4ccdcd059923b
|
||||
|
||||
...
|
||||
|
@ -5,6 +5,7 @@
|
||||
[![Python Version](https://img.shields.io/pypi/pyversions/docker-tidy.svg)](https://pypi.org/project/docker-tidy/)
|
||||
[![PyPi Status](https://img.shields.io/pypi/status/docker-tidy.svg)](https://pypi.org/project/docker-tidy/)
|
||||
[![PyPi Release](https://img.shields.io/pypi/v/docker-tidy.svg)](https://pypi.org/project/docker-tidy/)
|
||||
[![Codecov](https://img.shields.io/codecov/c/github/xoxys/docker-tidy)](https://codecov.io/gh/xoxys/docker-tidy)
|
||||
[![License: MIT](https://img.shields.io/github/license/xoxys/docker-tidy)](LICENSE)
|
||||
|
||||
This project is a fork of [Yelp/docker-custodian](https://github.com/Yelp/docker-custodian). Keep docker hosts tidy.
|
||||
|
@ -7,6 +7,7 @@ title: Documentation
|
||||
[![Python Version](https://img.shields.io/pypi/pyversions/docker-tidy.svg)](https://pypi.org/project/docker-tidy/)
|
||||
[![PyPi Status](https://img.shields.io/pypi/status/docker-tidy.svg)](https://pypi.org/project/docker-tidy/)
|
||||
[![PyPi Release](https://img.shields.io/pypi/v/docker-tidy.svg)](https://pypi.org/project/docker-tidy/)
|
||||
[![Codecov](https://img.shields.io/codecov/c/github/xoxys/docker-tidy)](https://codecov.io/gh/xoxys/docker-tidy)
|
||||
[![License: MIT](https://img.shields.io/github/license/xoxys/docker-tidy)](LICENSE)
|
||||
|
||||
This project is a fork of [Yelp/docker-custodian](https://github.com/Yelp/docker-custodian). Keep docker hosts tidy.
|
||||
|
Loading…
Reference in New Issue
Block a user