manga-dlp/.woodpecker/tests.yml

84 lines
1.7 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
platform: linux/amd64
2022-05-13 11:49:13 +02:00
clone:
git:
2022-12-29 14:38:27 +01:00
image: woodpeckerci/plugin-git:v1.6.0
2022-05-13 11:49:13 +02:00
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:
- just test_shfmt
2022-05-12 23:27:09 +02:00
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:
- just test_black
2022-07-15 14:10:17 +02:00
# check static typing - python
test-pyright:
image: cr.44net.ch/ci-plugins/tests
pull: true
commands:
- just install_deps
- just test_pyright
# ruff test - python
test-ruff:
2022-07-21 20:55:35 +02:00
image: cr.44net.ch/ci-plugins/tests
pull: true
commands:
- just test_ruff
2022-07-21 20:55:35 +02:00
2022-08-15 14:53:45 +02:00
# test mkdocs generation
test-mkdocs:
image: cr.44net.ch/ci-plugins/tests
pull: true
commands:
- python3 -m pip install mkdocs
- cd docs || exit 1
- python3 -m mkdocs build --strict
# test code with pytest - python
test-tox-pytest:
2022-06-26 17:56:48 +02:00
when:
event: [ push ]
2022-07-19 01:13:04 +02:00
image: cr.44net.ch/ci-plugins/tests
2022-05-12 23:27:09 +02:00
pull: true
commands:
- just test_pytest
2022-07-21 20:55:35 +02:00
# generate coverage report - python
test-tox-coverage:
when:
branch: master
2022-06-26 17:56:48 +02:00
event: [ pull_request ]
2022-07-19 01:13:04 +02:00
image: cr.44net.ch/ci-plugins/tests
pull: true
commands:
- just test_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-26 17:56:48 +02:00
event: [ pull_request ]
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