subscleaner/.gitlab-ci.yml
Roger Gonzalez ad437ce752
Some checks failed
CI + Deploy / lint (push) Failing after 6s
CI + Deploy / test (push) Has been skipped
CI + Deploy / deploy_to_pypi (push) Has been skipped
CI + Deploy / deploy_to_dockerhub (push) Has been skipped
CI + Deploy / deploy_to_gitea (push) Has been skipped
Add CI/CD workflow for automated deployments in Gitea
- Introduces a GitHub Actions workflow for CI/CD.
- Replaces GitLab CI configuration with GitHub Actions.
- Adds linting, testing, PyPI deployment, DockerHub deployment, and Gitea deployment jobs.
- Uses uv for consistent environment and dependency management.
- Configures DockerHub and Gitea deployments using secrets and variables.
- Removes GitLab CI configuration.
2025-05-17 14:25:05 -03:00

49 lines
833 B
YAML

image: python:latest
stages:
- lint
- test
- deploy
before_script:
- pip install uv
- uv sync
lint:
stage: lint
script:
- uv run ruff check
- uv run ruff format --check
test:
stage: test
script:
- uv run pytest
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
deploy_to_gitlab:
stage: deploy
needs:
- job: deploy_to_pypi
optional: true
only:
refs:
- master
changes:
- pyproject.toml
- Dockerfile
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/subscleaner:latest .