manga-dlp/.woodpecker/tests.yml

68 lines
1.4 KiB
YAML
Raw Normal View History

2022-05-12 23:27:09 +02:00
##############################
# code testing and analysis #
#############################
2022-05-13 00:46:56 +02:00
# branch: all
# event: all
2022-05-12 23:27:09 +02:00
2022-05-13 11:49:13 +02:00
clone:
git:
image: woodpeckerci/plugin-git
2022-05-12 23:27:09 +02:00
pipeline:
2022-06-20 14:31:41 +02:00
# check code style - shell
2022-05-12 23:27:09 +02:00
test-shfmt:
2022-06-23 12:06:18 +02:00
image: cr.44net.ch/ci-plugins/tests
2022-05-12 23:27:09 +02:00
pull: true
commands:
- shfmt -d -i 4 -bn -ci -sr .
2022-06-20 14:31:41 +02:00
# check code style - python
2022-05-12 23:27:09 +02:00
test-black:
2022-06-23 12:06:18 +02:00
image: cr.44net.ch/ci-plugins/tests
2022-05-12 23:27:09 +02:00
pull: true
commands:
2022-06-20 14:31:41 +02:00
- black --check --diff .
# check imports - python
test-isort:
2022-06-23 12:06:18 +02:00
image: cr.44net.ch/ci-plugins/tests
2022-06-20 14:31:41 +02:00
pull: true
commands:
2022-06-21 12:52:09 +02:00
- isort --check-only --diff .
2022-06-20 14:31:41 +02:00
# check static typing - python
test-mypy:
2022-06-23 12:06:18 +02:00
image: cr.44net.ch/ci-plugins/tests
2022-06-20 14:31:41 +02:00
pull: true
commands:
2022-06-21 12:52:09 +02:00
- mypy --install-types --non-interactive mangadlp/
2022-05-12 23:27:09 +02:00
# test code with different python versions
test-tox-pytest:
2022-06-25 02:50:39 +02:00
image: cr.44net.ch/ci-plugins/multipy:1-linux-amd64
2022-05-12 23:27:09 +02:00
pull: true
commands:
2022-06-25 02:50:39 +02:00
- tox
# generate coverage report
test-tox-coverage:
when:
branch: master
image: cr.44net.ch/ci-plugins/multipy:1-linux-amd64
pull: true
commands:
2022-06-25 02:50:39 +02:00
- tox -e coverage
2022-05-12 23:27:09 +02:00
# analyse code with sonarqube and upload it
sonarqube-analysis:
2022-05-13 23:14:10 +02:00
when:
branch: master
2022-06-23 12:06:18 +02:00
image: cr.44net.ch/ci-plugins/sonar-scanner
2022-05-12 23:27:09 +02:00
pull: true
settings:
2022-06-21 17:16:52 +02:00
sonar_host: https://sonarqube.44net.ch
2022-05-12 23:27:09 +02:00
sonar_token:
from_secret: sq-44net-token
usingProperties: true