Files
xtream_codes_m3u_list_builder/.gitea/workflows/ci.yaml
unai 9cfada5b92
Some checks failed
CI/CD Pipeline / test-and-lint (pull_request) Failing after 5m13s
CI/CD Pipeline / publish-container (pull_request) Has been skipped
Add CI/CD pipeline configuration for testing and container publishing
2026-02-01 18:16:35 +00:00

55 lines
1.4 KiB
YAML

name: CI/CD Pipeline
on:
push:
branches: [main]
tags: ['v*']
pull_request:
jobs:
test-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.14'
- name: Install Poetry
run: pip install poetry
- name: Install dependencies
run: poetry install
- name: Lint with Ruff (PEP-8 & Docstrings)
run: poetry run ruff check .
- name: Run Tests with Coverage
run: poetry run pytest --cov=my_project --cov-report=term-missing --cov-fail-under=80
publish-container:
needs: test-and-lint
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: ${{ gitea.server_url }}
# Nota: Quita 'https://' si server_url lo incluye y falla, suele ser solo dominio:puerto
username: ${{ gitea.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ gitea.server_url }}/${{ gitea.repository }}:latest
${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.ref_name }}