add docs validation to ci

This commit is contained in:
Robert Kaussow 2020-06-03 17:17:03 +02:00
parent 88c21fb6bb
commit f4ae8f4f8a
7 changed files with 144 additions and 29 deletions

12
.dictionary Normal file
View File

@ -0,0 +1,12 @@
Codecov
DNS
Kaussow
PyPI
corenetworks
toc
CoreNetworks
usr
env
dns
CoreNetworksException
str

View File

@ -1,5 +1,5 @@
local PythonVersion(pyversion='2.7') = {
name: 'python' + std.strReplace(pyversion, '.', ''),
name: 'python' + std.strReplace(pyversion, '.', '') + '-pytest',
image: 'python:' + pyversion,
environment: {
PY_COLORS: 1,
@ -7,7 +7,7 @@ local PythonVersion(pyversion='2.7') = {
commands: [
'pip install -r dev-requirements.txt -qq',
'pip install -qq .',
'pytest corenetworks --cov=corenetworks --no-cov-on-fail',
'pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail',
],
depends_on: [
'clone',
@ -192,11 +192,64 @@ local PipelineDocs = {
],
},
{
name: 'test',
image: 'klakegg/hugo:0.69.0-ext-alpine',
name: 'markdownlint',
image: 'node:lts-alpine',
commands: [
'cd docs/ && hugo-official',
'npm install -g markdownlint-cli',
"markdownlint 'docs/content/**/*.md' 'README.md' -p .gitignore",
],
environment: {
FORCE_COLOR: true,
NPM_CONFIG_LOGLEVEL: 'error',
},
},
{
name: 'spellcheck',
image: 'node:lts-alpine',
commands: [
'npm install -g spellchecker-cli',
"spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions",
],
environment: {
FORCE_COLOR: true,
NPM_CONFIG_LOGLEVEL: 'error',
},
},
{
name: 'testbuild',
image: 'klakegg/hugo:0.72.0-ext-alpine',
commands: [
'hugo-official -s docs/ -b http://localhost/',
],
},
{
name: 'link-validation',
image: 'xoxys/link-validator',
commands: [
'link-validator -ro',
],
environment: {
LINK_VALIDATOR_BASE_DIR: 'docs/public',
},
},
{
name: 'build',
image: 'klakegg/hugo:0.72.0-ext-alpine',
commands: [
'hugo-official -s docs/',
],
},
{
name: 'beautify',
image: 'node:lts-alpine',
commands: [
'npm install -g js-beautify',
"html-beautify -r -f 'docs/public/**/*.html'",
],
environment: {
FORCE_COLOR: true,
NPM_CONFIG_LOGLEVEL: 'error',
},
},
{
name: 'publish',

View File

@ -31,56 +31,56 @@ platform:
arch: amd64
steps:
- name: python27
- name: python27-pytest
image: python:2.7
commands:
- pip install -r dev-requirements.txt -qq
- pip install -qq .
- pytest corenetworks --cov=corenetworks --no-cov-on-fail
- pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
- name: python35
- name: python35-pytest
image: python:3.5
commands:
- pip install -r dev-requirements.txt -qq
- pip install -qq .
- pytest corenetworks --cov=corenetworks --no-cov-on-fail
- pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
- name: python36
- name: python36-pytest
image: python:3.6
commands:
- pip install -r dev-requirements.txt -qq
- pip install -qq .
- pytest corenetworks --cov=corenetworks --no-cov-on-fail
- pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
- name: python37
- name: python37-pytest
image: python:3.7
commands:
- pip install -r dev-requirements.txt -qq
- pip install -qq .
- pytest corenetworks --cov=corenetworks --no-cov-on-fail
- pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
- clone
- name: python38
- name: python38-pytest
image: python:3.8
commands:
- pip install -r dev-requirements.txt -qq
- pip install -qq .
- pytest corenetworks --cov=corenetworks --no-cov-on-fail
- pytest corenetworks --cov=corenetworks --cov-append --no-cov-on-fail
environment:
PY_COLORS: 1
depends_on:
@ -215,10 +215,49 @@ steps:
- pip install -qq .
- make doc
- name: test
image: klakegg/hugo:0.69.0-ext-alpine
- name: markdownlint
image: node:lts-alpine
commands:
- cd docs/ && hugo-official
- npm install -g markdownlint-cli
- markdownlint 'docs/content/**/*.md' 'README.md' -p .gitignore
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
- name: spellcheck
image: node:lts-alpine
commands:
- npm install -g spellchecker-cli
- spellchecker --files 'docs/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
- name: testbuild
image: klakegg/hugo:0.72.0-ext-alpine
commands:
- hugo-official -s docs/ -b http://localhost/
- name: link-validation
image: xoxys/link-validator
commands:
- link-validator -ro
environment:
LINK_VALIDATOR_BASE_DIR: docs/public
- name: build
image: klakegg/hugo:0.72.0-ext-alpine
commands:
- hugo-official -s docs/
- name: beautify
image: node:lts-alpine
commands:
- npm install -g js-beautify
- html-beautify -r -f 'docs/public/**/*.html'
environment:
FORCE_COLOR: true
NPM_CONFIG_LOGLEVEL: error
- name: publish
image: plugins/s3-sync
@ -282,6 +321,6 @@ depends_on:
---
kind: signature
hmac: a5e57ed65ef9a112b5fa6de464f53526a3efc7df88e3bf6cf7ee130450a84017
hmac: 457331c0185352fd5ff3f72b2ca3d85af12623a5011fe1d9686b27f9a5d8b4c9
...

6
.markdownlint.yml Normal file
View File

@ -0,0 +1,6 @@
---
default: True
MD013: False
MD041: False
MD004:
style: dash

View File

@ -2,8 +2,8 @@
[![Build Status](https://img.shields.io/drone/build/xoxys/corenetworks?logo=drone)](https://cloud.drone.io/xoxys/corenetworks)
[![Python Version](https://img.shields.io/pypi/pyversions/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPi Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPi Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPI Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPI Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![Codecov](https://img.shields.io/codecov/c/github/xoxys/corenetworks)](https://codecov.io/gh/xoxys/corenetworks)
[![License: MIT](https://img.shields.io/github/license/xoxys/corenetworks)](LICENSE)

View File

@ -4,9 +4,9 @@ title: Documentation
[![Build Status](https://img.shields.io/drone/build/xoxys/corenetworks?logo=drone)](https://cloud.drone.io/xoxys/corenetworks/)
[![Python Version](https://img.shields.io/pypi/pyversions/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPi Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPi Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPI Status](https://img.shields.io/pypi/status/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![PyPI Release](https://img.shields.io/pypi/v/corenetworks.svg)](https://pypi.org/project/corenetworks/)
[![Codecov](https://img.shields.io/codecov/c/github/xoxys/corenetworks)](https://codecov.io/gh/xoxys/corenetworks)
[![License: MIT](https://img.shields.io/github/license/xoxys/corenetworks)](LICENSE)
[![License: MIT](https://img.shields.io/github/license/xoxys/corenetworks)](https://github.com/xoxys/corenetworks/blob/master/LICENSE)
Python library for the [https://core-networks.de](https://beta.api.core-networks.de/doc/) DNS API.

View File

@ -6,13 +6,17 @@ title: Setup
## Installation
```python
<!-- prettier-ignore-start -->
{{< highlight Python "linenos=table" >}}
pip install corenetworks
```
{{< /highlight >}}
<!-- prettier-ignore-end -->
## Example usage
```python
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
{{< highlight Python "linenos=table" >}}
#!/usr/bin/env python
import requests
@ -67,5 +71,6 @@ try:
except Exception as e:
print(str(e))
```
{{< /highlight >}}
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->