Files
paroles-net-scraper/.gitlab-ci.yml
T
herel af71f5e80a Initial commit
- Python package to fetch song lyrics from paroles.net
- Web scraping functionality with requests and BeautifulSoup4
- Command-line interface for easy usage
- Comprehensive test suite with pytest
- GitLab CI configuration with uv support
- Package metadata and dependencies in pyproject.toml
- Documentation and usage instructions
2025-08-11 14:21:12 +02:00

73 lines
1.5 KiB
YAML

# GitLab CI configuration for paroles-net-scraper
# Using uv for Python package management
stages:
- test
- build
- deploy
variables:
UV_VERSION: "0.2.25"
PYTHON_VERSION: "3.11"
# Cache uv packages between jobs
cache:
key: uv-cache
paths:
- .uv/
- uv.lock
before_script:
# Install uv if not already available
- which uv || curl -LsSf https://astral.sh/uv/install.sh | sh
# Set up Python environment
- uv python install $PYTHON_VERSION
.test_base:
stage: test
script:
# Sync dependencies
- uv sync --dev
# Run tests
- uv run pytest tests/ -v
test:python-3.11:
extends: .test_base
image: python:3.11-slim
test:python-3.12:
extends: .test_base
image: python:3.12-slim
variables:
PYTHON_VERSION: "3.12"
build-package:
stage: build
image: python:3.11-slim
script:
# Install uv
- which uv || curl -LsSf https://astral.sh/uv/install.sh | sh
# Sync dependencies
- uv sync --dev
# Build the package
- uv build
artifacts:
paths:
- dist/
expire_in: 1 week
# Deploy job (only runs on tags)
deploy-package:
stage: deploy
image: python:3.11-slim
script:
# Install uv
- which uv || curl -LsSf https://astral.sh/uv/install.sh | sh
# Install twine for uploading to PyPI
- uv pip install twine
# Upload to PyPI (using credentials from GitLab CI/CD variables)
- twine upload --username $PYPI_USERNAME --password $PYPI_PASSWORD dist/*
only:
- tags
dependencies:
- build-package