Some checks failed
- 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.
49 lines
833 B
YAML
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 .
|