fix and add ci/cd tests
This commit is contained in:
parent
d6a9651cc4
commit
b0fb8d4860
7 changed files with 146 additions and 11 deletions
42
.woodpecker/publish_build.yml
Normal file
42
.woodpecker/publish_build.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
#############
|
||||
# build app #
|
||||
#############
|
||||
# branch: master
|
||||
# event: tag
|
||||
|
||||
depends_on:
|
||||
- tests
|
||||
|
||||
clone:
|
||||
git:
|
||||
when:
|
||||
#branch: master
|
||||
event: tag
|
||||
image: woodpeckerci/plugin-git
|
||||
|
||||
pipeline:
|
||||
|
||||
# build wheel and dist
|
||||
build-pypi:
|
||||
when:
|
||||
#branch: master
|
||||
event: tag
|
||||
image: cr.44net.ch/drone-plugins/test
|
||||
pull: true
|
||||
commands:
|
||||
- hatch build
|
||||
|
||||
# release pypi
|
||||
release-pypi:
|
||||
when:
|
||||
#branch: master
|
||||
event: tag
|
||||
image: cr.44net.ch/drone-plugins/test
|
||||
pull: true
|
||||
secrets:
|
||||
- source: pypi_username
|
||||
target: HATCH_PYPI_USER
|
||||
- source: pypi_token
|
||||
target: HATCH_PYPI_AUTH
|
||||
commands:
|
||||
- hatch publish
|
|
@ -69,4 +69,3 @@ pipeline:
|
|||
from_secret: cr-dhub-username
|
||||
password:
|
||||
from_secret: cr-dhub-key
|
||||
|
||||
|
|
47
.woodpecker/test_build.yml
Normal file
47
.woodpecker/test_build.yml
Normal file
|
@ -0,0 +1,47 @@
|
|||
##################
|
||||
# test build app #
|
||||
##################
|
||||
# branch: master
|
||||
# event: pull_request
|
||||
|
||||
depends_on:
|
||||
- tests
|
||||
|
||||
clone:
|
||||
git:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
image: woodpeckerci/plugin-git
|
||||
|
||||
pipeline:
|
||||
|
||||
# build wheel and dist
|
||||
test-build-pypi:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
image: cr.44net.ch/drone-plugins/test
|
||||
pull: true
|
||||
commands:
|
||||
- hatch build
|
||||
|
||||
# test code with different python versions - amd64
|
||||
test-tox-amd64:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
image: cr.44net.ch/drone-plugins/test:1-linux-amd64
|
||||
pull: true
|
||||
commands:
|
||||
- tox
|
||||
|
||||
# test code with different python versions - arm64
|
||||
test-tox-arm64:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
image: cr.44net.ch/drone-plugins/test:1-linux-arm64
|
||||
pull: true
|
||||
commands:
|
||||
- tox
|
|
@ -1,6 +1,6 @@
|
|||
#######################
|
||||
# build docker images #
|
||||
#######################
|
||||
############################
|
||||
# test build docker images #
|
||||
############################
|
||||
# branch: master
|
||||
# event: pull_request
|
||||
|
||||
|
@ -17,7 +17,7 @@ clone:
|
|||
pipeline:
|
||||
|
||||
# build docker image for amd64 - x86
|
||||
dryrun-build-amd64:
|
||||
test-build-amd64:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
|
@ -29,11 +29,11 @@ pipeline:
|
|||
platforms: linux/amd64
|
||||
dockerfile: docker/Dockerfile.amd64
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-amd64
|
||||
auto_tag_suffix: linux-amd64-test
|
||||
build_args: BUILD_VERSION=${CI_COMMIT_TAG}
|
||||
|
||||
# build docker image for arm64
|
||||
dryrun-build-arm64:
|
||||
test-build-arm64:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
|
@ -45,6 +45,5 @@ pipeline:
|
|||
platforms: linux/arm64
|
||||
dockerfile: docker/Dockerfile.arm64
|
||||
auto_tag: true
|
||||
auto_tag_suffix: linux-arm64
|
||||
auto_tag_suffix: linux-arm64-test
|
||||
build_args: BUILD_VERSION=${CI_COMMIT_TAG}
|
||||
|
39
.woodpecker/test_release.yml
Normal file
39
.woodpecker/test_release.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
########################
|
||||
# test publish release #
|
||||
########################
|
||||
# branch: master
|
||||
# event: pull_request
|
||||
|
||||
depends_on:
|
||||
- tests
|
||||
|
||||
clone:
|
||||
git:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
image: woodpeckerci/plugin-git
|
||||
|
||||
pipeline:
|
||||
|
||||
# create release tar
|
||||
test-create-release-tar:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
image: cr.44net.ch/baseimages/debian-base
|
||||
pull: true
|
||||
commands:
|
||||
- tar -czf manga-dlp-${CI_COMMIT_TAG}.tar.gz --files-from=release-files.txt
|
||||
- tar -tzf manga-dlp-${CI_COMMIT_TAG}.tar.gz
|
||||
|
||||
# create release-notes
|
||||
test-create-release-notes:
|
||||
when:
|
||||
branch: master
|
||||
event: pull_request
|
||||
image: cr.44net.ch/baseimages/debian-base
|
||||
pull: true
|
||||
commands:
|
||||
- bash get_release_notes.sh ${CI_COMMIT_TAG}
|
||||
- cat RELEASENOTES.md
|
|
@ -59,4 +59,3 @@ pipeline:
|
|||
sonar_token:
|
||||
from_secret: sq-44net-token
|
||||
usingProperties: true
|
||||
|
||||
|
|
|
@ -92,6 +92,16 @@ ignore-vcs = true
|
|||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
include = ["mangadlp"]
|
||||
exclude = ["docker"]
|
||||
exclude = [
|
||||
"docker",
|
||||
".tox",
|
||||
".mypy_cache"
|
||||
]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
include = ["mangadlp"]
|
||||
exclude = [
|
||||
"docker",
|
||||
".tox",
|
||||
".mypy_cache"
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue