cleanmedia/.gitlab-ci.yml
Christian Groschupp 87276d9432 feat: switch to uv
2025-03-28 10:19:22 +01:00

62 lines
1.2 KiB
YAML

image: ghcr.io/astral-sh/uv:0.6-python3.13-bookworm
stages:
- lint
- test
- deploy
lint:
stage: lint
script:
- uv run ruff check
- uv run ruff format --check
- uv run mypy .
test:
stage: test
script:
- uv run pytest -v --cov=. --cov-report=xml
after_script:
- bash <(curl -s https://codecov.io/bash)
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
deploy_to_dockerhub:
stage: deploy
needs:
- test
only:
refs:
- master
except:
- tags
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
- docker buildx create --use
script:
- docker buildx build --push --tag rogsme/cleanmedia:latest .
deploy_to_gitlab:
stage: deploy
needs:
- test
only:
refs:
- master
except:
- tags
image: docker:latest
services:
- docker:dind
before_script:
- docker login registry.gitlab.com -u $GITLAB_USERNAME -p $GITLAB_PASSWORD
- docker buildx create --use
script:
- docker buildx build --push --tag registry.gitlab.com/rogs/cleanmedia:latest .